diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.Common/HTTPHelper.cs b/ICSSoft.WMS.WebAPI/ICSSoft.Common/HTTPHelper.cs
index 053bbd9..a14b11d 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.Common/HTTPHelper.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.Common/HTTPHelper.cs
@@ -31,7 +31,8 @@ namespace ICSSoft.Common
}
catch (System.Net.WebException ex)
{
- throw new Exception(apiName + "调用失败," + ex.Message+Environment.NewLine+url + Environment.NewLine + body);
+ log.Error(ex.ToString() + Environment.NewLine + url + Environment.NewLine + body);
+ throw new Exception(apiName + "调用失败," + ex.Message);
}
}
}
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs
index b00bbe8..304f464 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSManufactureService.cs
@@ -30,7 +30,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void MOIssueDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void MOIssueDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -41,12 +41,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('生产订单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo125") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('生产订单:{0},行号:{3} 不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo126") + @"',16,1);
RETURN
END
UPDATE a SET IssueQuantity=ISNULL(IssueQuantity,0)+'{2}'
@@ -58,7 +58,7 @@ namespace ICSSoft.DataProject
INNER JOIN ICSMO b ON a.MODetailID=b.MODetailID AND a.WorkPoint=b.WorkPoint
WHERE b.MOCode='{0}' AND b.Sequence+'-'+a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void MOIssueDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void MOIssueDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -126,7 +126,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["IssueCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["IssueCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -138,7 +139,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -158,7 +159,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void MOApply(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void MOApply(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -168,12 +169,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('领料申请单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo128") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('领料申请单:{0},行号:{3} 不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo129") + @"',16,1);
RETURN
END
UPDATE a SET IssueQuantity=ISNULL(IssueQuantity,0)+'{2}'
@@ -183,7 +184,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSMOApply a
WHERE a.ApplyCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void MOApplyERP(string TransType, string Identification, SqlCommand cmd)
+ public static void MOApplyERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -251,7 +252,7 @@ namespace ICSSoft.DataProject
{
JObject det = (JObject)detail;
ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(),
- det["DetailID"].ToString(), jo["IssueCode"].ToString(), det["Sequence"].ToString(), cmd);
+ det["DetailID"].ToString(), jo["IssueCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -263,7 +264,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -283,7 +284,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void MOIssue(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void MOIssue(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -293,12 +294,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('材料出库单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo131") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('材料出库单:{0},行号:{3} 不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo132") + @"',16,1);
RETURN
END
UPDATE a SET IssueQuantity=ISNULL(IssueQuantity,0)+'{2}'
@@ -308,7 +309,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSMOIssue a
WHERE a.IssueCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void MOIssueERP(string TransType, string Identification, SqlCommand cmd)
+ public static void MOIssueERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -340,7 +341,7 @@ namespace ICSSoft.DataProject
INNER JOIN ICSMOIssue b ON a.TransCode=b.IssueCode AND a.TransSequence=b.Sequence AND a.WorkPoint=b.WorkPoint
WHERE a.Identification='{0}' AND b.Quantity!=b.IssueQuantity)
BEGIN
- RAISERROR('材料出库单必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo094") + @"',16,1);
RETURN
END
SELECT b.IssueID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity
@@ -365,7 +366,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -376,7 +377,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -396,7 +397,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void MOIssueDocNegative(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void MOIssueDocNegative(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -410,12 +411,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSMOApplyNegDetail c ON b.TransCode=c.ApplyNegCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Quantity
///
///
- public static void MOIssueDocNegativeERP(string TransType, string Identification, SqlCommand cmd)
+ public static void MOIssueDocNegativeERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -512,7 +513,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT Costre FROM #TempERP WHERE SourceType='{0}')
BEGIN
- RAISERROR('材料出库单必须关联备料表或领料申请单',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo135") + @"',16,1);
END
SELECT DISTINCT Costre,WorkPoint,DepCode,MODetailID,WarehouseCode AS WHCode,SourceType,MOCode AS SourceCode,MUSER AS [User],SYSDATETIME() AS MTime,UpdateTodoQuantity FROM #TempERP
@@ -522,7 +523,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("类型不符!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo003"));//"类型不符!");
}
sql = string.Format(sql, Identification);
DataSet ds = DBHelper.SQlReturnDataSet(sql, cmd);
@@ -545,7 +546,7 @@ namespace ICSSoft.DataProject
{
JObject det = (JObject)detail;
ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(),
- det["DetailID"].ToString(), jo["IssueNEGCode"].ToString(), det["Sequence"].ToString(), cmd);
+ det["DetailID"].ToString(), jo["IssueNEGCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -557,7 +558,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -577,7 +578,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void ManufactureReceiveDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void ManufactureReceiveDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -589,12 +590,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status='3')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据已关闭!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo082") + @"',16,1);
RETURN
END
UPDATE c SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
@@ -607,12 +608,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSMO c ON b.TransCode=c.MOCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Quantity
///
///
- public static void ManufactureReceiveDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void ManufactureReceiveDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -673,7 +674,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["MODetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["MRCVCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["MODetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["MRCVCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -685,7 +687,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -705,7 +707,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void ManufactureReceive(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void ManufactureReceive(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -717,12 +719,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo137") + @"',16,1);
RETURN
END
UPDATE c SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
@@ -735,12 +737,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSManufactureReceive c ON b.TransCode=c.RCVCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Type='1' AND c.Quantity
///
///
- public static void ManufactureReceiveERP(string TransType, string Identification, SqlCommand cmd)
+ public static void ManufactureReceiveERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -764,7 +766,7 @@ namespace ICSSoft.DataProject
WHERE b.RCVCode+b.WorkPoint IN (SELECT a.TransCode+a.WorkPoint FROM ICSWareHouseLotInfoLog a WHERE a.Identification='{0}')
AND b.Quantity!=b.RCVQuantity)
BEGIN
- RAISERROR('生产入库单下的条码必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo096") + @"',16,1);
RETURN
END
SELECT b.RCVID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -787,7 +789,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -798,7 +800,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs
index e27dcea..0a053ed 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSOutsourcingService.cs
@@ -29,7 +29,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OutsourcingIssueDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OutsourcingIssueDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -40,12 +40,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('委外订单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo104") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('委外订单:{0},行号:{3} 不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo105") + @"',16,1);
RETURN
END
UPDATE a SET IssueQuantity=ISNULL(IssueQuantity,0)+'{2}'
@@ -57,7 +57,7 @@ namespace ICSSoft.DataProject
INNER JOIN ICSOutsourcingOrder b ON a.OODetailID=b.OODetailID AND a.WorkPoint=b.WorkPoint
WHERE b.OOCode='{0}' AND b.Sequence+'-'+a.Sequence='{3}' and b.WorkPoint='{1}' AND a.Quantity
///
///
- public static void OutsourcingIssueDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OutsourcingIssueDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -125,7 +125,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["IssueCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["IssueCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -137,7 +138,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -157,7 +158,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OOApply(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OOApply(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -167,12 +168,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('委外领料申请单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo108") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('委外领料申请单:{0},行号:{3} 不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo109") + @"',16,1);
RETURN
END
UPDATE a SET IssueQuantity=ISNULL(IssueQuantity,0)+'{2}'
@@ -182,7 +183,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSOApply a
WHERE a.ApplyCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void OOApplyERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OOApplyERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -249,7 +250,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["IssueCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["IssueCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -261,7 +263,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -281,7 +283,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OOIssue(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OOIssue(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -291,12 +293,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('委外材料出库单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo111") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('委外材料出库单:{0},行号:{3} 不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo112") + @"',16,1);
RETURN
END
UPDATE a SET IssueQuantity=ISNULL(IssueQuantity,0)+'{2}'
@@ -306,7 +308,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSOIssue a
WHERE a.IssueCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void OOIssueERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OOIssueERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -338,7 +340,7 @@ namespace ICSSoft.DataProject
INNER JOIN ICSOIssue b ON a.TransCode=b.IssueCode AND a.TransSequence=b.Sequence AND a.WorkPoint=b.WorkPoint
WHERE a.Identification='{0}' AND b.Quantity!=b.IssueQuantity)
BEGIN
- RAISERROR('委外材料出库单必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo095") + @"',16,1);
RETURN
END
SELECT b.IssueID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -361,7 +363,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -372,7 +374,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -392,7 +394,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OutsourcingIssueDoNegative(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OutsourcingIssueDoNegative(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -406,12 +408,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSOApplyNegDetail c ON b.TransCode=c.OApplyNegCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Quantity
///
///
- public static void OutsourcingIssueDoNegativeERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OutsourcingIssueDoNegativeERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -508,7 +510,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT Costre FROM #TempERP WHERE SourceType='{0}')
BEGIN
- RAISERROR('委外材料出库单必须关联备料表或领料申请单',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo116") + @"',16,1);
END
SELECT DISTINCT Costre,WorkPoint,DepCode,SourceDetailID,WarehouseCode AS WHCode,SourceType,OOCode AS SourceCode,MUSER AS [User],SYSDATETIME() AS MTime,UpdateTodoQuantity FROM #TempERP
@@ -518,7 +520,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("类型不符!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo003"));//"类型不符!");
}
sql = string.Format(sql, Identification);
@@ -541,7 +543,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["IssueNEGCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["IssueNEGCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
//List negList = JsonConvert.DeserializeObject>(result.Data.ToString());
@@ -561,7 +564,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -579,7 +582,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OutsourcingDeliveryNoticeERP(string ODNCode, string WorkPoint, SqlCommand cmd)
+ public static void OutsourcingDeliveryNoticeERP(string ODNCode, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -626,7 +629,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(ERPupdate, cmd))
{
- throw new Exception("到货单更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo079"));//"到货单更新失败!");
}
}
}
@@ -639,7 +642,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -659,7 +662,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OutsourcingReceiveDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OutsourcingReceiveDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -671,12 +674,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status='3')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据已关闭!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo082") + @"',16,1);
RETURN
END
UPDATE c SET InQuantity=ISNULL(InQuantity,0)+'{2}'
@@ -689,12 +692,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSOutsourcingOrder c ON b.TransCode=c.OOCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Quantity
///
///
- public static void OutsourcingReceiveDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OutsourcingReceiveDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -755,7 +758,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["OODetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["ORCVTCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["OODetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["ORCVTCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -767,7 +771,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -787,7 +791,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void ODeliveryNoticeIn(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void ODeliveryNoticeIn(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -799,12 +803,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status='3')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据已关闭!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo082") + @"',16,1);
RETURN
END
UPDATE c SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
@@ -817,12 +821,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSODeliveryNotice c ON b.TransCode=c.ODNCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.ODNType='1' AND c.Quantity
///
///
- public static void ODeliveryNoticeInERP(string TransType, string Identification, SqlCommand cmd)
+ public static void ODeliveryNoticeInERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -883,7 +887,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["ODNDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["ORCVTCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["ODNDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["ORCVTCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -895,7 +900,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -915,7 +920,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OutsourcingRejectDocIn(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OutsourcingRejectDocIn(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -927,12 +932,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status='3')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据已关闭!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo082") + @"',16,1);
RETURN
END
UPDATE c SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
@@ -945,12 +950,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSODeliveryNotice c ON b.TransCode=c.ODNCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.ODNType='3' AND c.Quantity
///
///
- public static void OutsourcingRejectDocInERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OutsourcingRejectDocInERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
//try
//{
@@ -1016,7 +1021,7 @@ namespace ICSSoft.DataProject
// }
// else
// {
- // throw new Exception("ERP接口调用失败:" + result.Message);
+ // throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
// }
// #endregion
//}
@@ -1036,7 +1041,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OutsourcingReturnBack(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OutsourcingReturnBack(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -1045,12 +1050,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('委外退货单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo119") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('委外退货单:{0},行号:{3} 不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo120") + @"',16,1);
RETURN
END
@@ -1061,7 +1066,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSODeliveryNotice a
WHERE a.ODNCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void OutsourcingReturnBackERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OutsourcingReturnBackERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -1129,7 +1134,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["ODNRTDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["ORCVNEGCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["ODNRTDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["ORCVNEGCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -1141,7 +1147,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -1161,7 +1167,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OutsourcingReceiveDocNegative(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OutsourcingReceiveDocNegative(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -1171,12 +1177,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('委外红字入库单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo122") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('委外红字入库单:{0},行号:{3} 不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo123") + @"',16,1);
RETURN
END
UPDATE a SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
@@ -1186,7 +1192,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSOutsourcingReceive a
WHERE a.RCVCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Type='2' AND a.Quantity
///
///
- public static void OutsourcingReceiveDocNegativeERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OutsourcingReceiveDocNegativeERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -1218,7 +1224,7 @@ namespace ICSSoft.DataProject
INNER JOIN ICSOutsourcingReceive b ON a.TransCode=b.RCVCode AND a.TransSequence=b.Sequence AND a.WorkPoint=b.WorkPoint
WHERE a.Identification='{0}' AND b.Quantity!=b.RCVQuantity)
BEGIN
- RAISERROR('委外红字入库单必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo103") + @"',16,1);
RETURN
END
SELECT b.RCVID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -1241,7 +1247,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -1252,7 +1258,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs
index c1935d4..22317f7 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs
@@ -28,7 +28,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void DeliveryNoticeERP(string DNCode, string WorkPoint, SqlCommand cmd)
+ public static void DeliveryNoticeERP(string DNCode, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -75,7 +75,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(ERPupdate, cmd))
{
- throw new Exception("到货单更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo079"));//"到货单更新失败!");
}
}
}
@@ -88,7 +88,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -108,7 +108,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void PurchaseReceiveDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void PurchaseReceiveDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -120,12 +120,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status='3')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据已关闭!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo082") + @"',16,1);
RETURN
END
UPDATE c SET InQuantity=ISNULL(InQuantity,0)+'{2}'
@@ -138,12 +138,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSPurchaseOrder c ON b.TransCode=c.POCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Quantity
///
///
- public static void PurchaseReceiveDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void PurchaseReceiveDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -204,7 +204,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["PODetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["RCVTCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["PODetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["RCVTCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -216,7 +217,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -236,7 +237,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void DeliveryNoticeIn(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void DeliveryNoticeIn(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -248,12 +249,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status='3')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据已关闭!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo082") + @"',16,1);
RETURN
END
UPDATE c SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
@@ -266,12 +267,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSDeliveryNotice c ON b.TransCode=c.DNCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.DNType='1' AND c.Quantity
///
///
- public static void DeliveryNoticeInERP(string TransType, string Identification, SqlCommand cmd)
+ public static void DeliveryNoticeInERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -332,7 +333,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["DNDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["RCVTCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["DNDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["RCVTCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -344,7 +346,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -364,7 +366,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void PurchaseRejectDocIn(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void PurchaseRejectDocIn(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -376,12 +378,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status='3')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据已关闭!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo082") + @"',16,1);
RETURN
END
UPDATE c SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
@@ -394,12 +396,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSDeliveryNotice c ON b.TransCode=c.DNCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.DNType='3' AND c.Quantity
///
///
- public static void PurchaseRejectDocInERP(string TransType, string Identification, SqlCommand cmd)
+ public static void PurchaseRejectDocInERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
//try
//{
@@ -465,7 +467,7 @@ namespace ICSSoft.DataProject
// }
// else
// {
- // throw new Exception("ERP接口调用失败:" + result.Message);
+ // throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
// }
// #endregion
//}
@@ -485,7 +487,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void PurchaseReceiveDoctNegative(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void PurchaseReceiveDoctNegative(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -494,12 +496,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('采购退货单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo085") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('采购退货单:{0},行号:{3} 不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo086") + @"',16,1);
RETURN
END
@@ -510,7 +512,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSDeliveryNotice a
WHERE a.DNCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void PurchaseReceiveDoctNegativeERP(string TransType, string Identification, SqlCommand cmd)
+ public static void PurchaseReceiveDoctNegativeERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -578,7 +580,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["DNRTDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["RCVNEGCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["DNRTDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["RCVNEGCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -590,7 +593,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -610,7 +613,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void PurchaseReceive(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void PurchaseReceive(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -620,12 +623,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('红字入库单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo089") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('红字入库单:{0},行号:{3} 不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo090") + @"',16,1);
RETURN
END
UPDATE a SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
@@ -635,7 +638,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSPurchaseReceive a
WHERE a.RCVCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Type='2' AND a.Quantity
///
///
- public static void PurchaseReceiveERP(string TransType, string Identification, SqlCommand cmd)
+ public static void PurchaseReceiveERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -667,7 +670,7 @@ namespace ICSSoft.DataProject
INNER JOIN ICSPurchaseReceive b ON a.TransCode=b.RCVCode AND a.TransSequence=b.Sequence AND a.WorkPoint=b.WorkPoint
WHERE a.Identification='{0}' AND b.Quantity!=b.RCVQuantity)
BEGIN
- RAISERROR('红字入库单必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo093") + @"',16,1);
RETURN
END
SELECT b.RCVID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -690,7 +693,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -701,7 +704,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs
index fcf9862..a6535de 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSalesService.cs
@@ -30,7 +30,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void SalesShipmentDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void SalesShipmentDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -40,12 +40,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('销售发货单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo139") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('销售发货单:{0},行号:{3} 不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo140") + @"',16,1);
RETURN
END
UPDATE a SET SDNQuantity=ISNULL(SDNQuantity,0)+'{2}'
@@ -55,7 +55,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSSDN a
WHERE a.SDNCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Type='1' AND a.Quantity
///
///
- public static void SalesShipmentDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void SalesShipmentDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -122,7 +122,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SDNDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["SSDCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SDNDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["SSDCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -134,7 +135,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -154,7 +155,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void SalesShipmentDocNegative(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void SalesShipmentDocNegative(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -166,12 +167,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo142") + @"',16,1);
RETURN
END
UPDATE c SET SDNQuantity=ISNULL(SDNQuantity,0)+'{2}'
@@ -184,7 +185,7 @@ namespace ICSSoft.DataProject
INNER JOIN ICSSDN c ON b.TransCode=c.SDNCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Type='2' AND c.Quantity
///
///
- public static void SalesShipmentDocNegativeERP(string TransType, string Identification, SqlCommand cmd)
+ public static void SalesShipmentDocNegativeERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -250,7 +251,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SDNRTDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["SDNNEGCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SDNRTDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["SDNNEGCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -262,7 +264,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -282,7 +284,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void SalesReturnBackIn(string TransCode, string TransSequence, string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void SalesReturnBackIn(string TransCode, string TransSequence, string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -294,12 +296,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo142") + @"',16,1);
RETURN
END
UPDATE sdn SET SDNQuantity=ISNULL(SDNQuantity,0)+'{2}'
@@ -312,12 +314,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSWareHouseLotInfo a ON a.LotNo=log.LotNo AND a.WorkPoint=log.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND sdn.SDNCode='{2}' AND sdn.Sequence='{3}' AND sdn.Type='2' AND sdn.Quantity
///
///
- public static void SalesReturnBackInERP(string TransType, string Identification, SqlCommand cmd)
+ public static void SalesReturnBackInERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -377,7 +379,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SDNRTDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["SDNNEGCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SDNRTDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["SDNNEGCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -389,7 +392,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
index 2819d19..57c5671 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
@@ -805,7 +805,7 @@ namespace ICSSoft.DataProject
{
sql = @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{2}' AND a.WorkPoint='{3}' AND a.Quantity>0)
BEGIN
- RAISERROR('" + language.GetNameByCode("WMSAPIInfo038") + @"',16,1);
+ RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo038"), "{2}") + @"',16,1);
RETURN
END
" + sql;
@@ -832,7 +832,7 @@ namespace ICSSoft.DataProject
{
sql = @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{2}' AND a.WorkPoint='{3}' AND a.Quantity>0)
BEGIN
- RAISERROR('" + language.GetNameByCode("WMSAPIInfo038") + @"',16,1);
+ RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo038"), "{2}") + @"',16,1);
RETURN
END
" + sql;
@@ -857,7 +857,7 @@ namespace ICSSoft.DataProject
{
sql = @"IF NOT EXISTS(SELECT a.ID FROM ICSInventoryLot a WHERE a.LotNo='{2}' AND a.WorkPoint='{3}')
BEGIN
- RAISERROR('" + language.GetNameByCode("WMSAPIInfo038") + @"',16,1);
+ RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo038"), "{2}") + @"',16,1);
RETURN
END
IF EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{2}' AND a.WorkPoint='{3}')
@@ -1018,7 +1018,7 @@ namespace ICSSoft.DataProject
if (TransType == TransTypeEnum.TwoStepTransferDocIn.GetDescription())
{
//更新源头单据数量
- ICSWareHouseService.TwoStepTransferDocIn(itemInfo.TransCode, itemInfo.TransSequence, itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSWareHouseService.TwoStepTransferDocIn(itemInfo.TransCode, itemInfo.TransSequence, itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language);
//入库
ICSWareHouseLotInfoService.WareHouseLotInfoTwoStepTransferDocIn(Identification, itemInfo.TransCode, itemInfo.TransSequence,
@@ -1031,7 +1031,7 @@ namespace ICSSoft.DataProject
if (TransType == TransTypeEnum.PurchaseReceiveDoc.GetDescription())
{
//更新源头单据数量
- ICSPurchaseService.PurchaseReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSPurchaseService.PurchaseReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language);
BusinessCode = TransTypeEnum.PurchaseReceiveDoc.GetDescription();
}
#endregion
@@ -1039,7 +1039,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.DeliveryNotice.GetDescription())
{
//更新源头单据数量
- ICSPurchaseService.DeliveryNoticeIn(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSPurchaseService.DeliveryNoticeIn(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language);
BusinessCode = TransTypeEnum.DeliveryNotice.GetDescription();
}
#endregion
@@ -1047,7 +1047,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.PurchaseRejectDoc.GetDescription())
{
//更新源头单据数量
- ICSPurchaseService.PurchaseRejectDocIn(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSPurchaseService.PurchaseRejectDocIn(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language);
BusinessCode = TransTypeEnum.PurchaseRejectDoc.GetDescription();
}
#endregion
@@ -1055,7 +1055,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.ODeliveryNotice.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.ODeliveryNoticeIn(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.ODeliveryNoticeIn(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language);
BusinessCode = TransTypeEnum.ODeliveryNotice.GetDescription();
}
#endregion
@@ -1063,7 +1063,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OutsourcingRejectDoc.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.OutsourcingRejectDocIn(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.OutsourcingRejectDocIn(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd, language);
BusinessCode = TransTypeEnum.OutsourcingRejectDoc.GetDescription();
}
#endregion
@@ -1073,7 +1073,7 @@ namespace ICSSoft.DataProject
|| TransType == TransTypeEnum.ICSOutsourcingIssueDoNegativeIssue.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.OutsourcingIssueDoNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.OutsourcingIssueDoNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
BusinessCode = TransTypeEnum.ICSOutsourcingIssueDoNegative.GetDescription();
}
#endregion
@@ -1081,7 +1081,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OutsourcingReceiveDoc.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.OutsourcingReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.OutsourcingReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
BusinessCode = TransTypeEnum.OutsourcingReceiveDoc.GetDescription();
}
#endregion
@@ -1091,7 +1091,7 @@ namespace ICSSoft.DataProject
|| TransType == TransTypeEnum.MOIssueDocNegativeIssue.GetDescription())
{
//更新源头单据数量
- ICSManufactureService.MOIssueDocNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSManufactureService.MOIssueDocNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
BusinessCode = TransTypeEnum.MOIssueDocNegative.GetDescription();
}
#endregion
@@ -1099,7 +1099,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.ManufactureReceiveDoc.GetDescription())
{
//更新源头单据数量
- ICSManufactureService.ManufactureReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSManufactureService.ManufactureReceiveDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
BusinessCode = TransTypeEnum.ManufactureReceiveDoc.GetDescription();
}
#endregion
@@ -1107,7 +1107,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.ManufactureReceive.GetDescription())
{
//更新源头单据数量
- ICSManufactureService.ManufactureReceive(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSManufactureService.ManufactureReceive(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
BusinessCode = TransTypeEnum.ManufactureReceive.GetDescription();
}
#endregion
@@ -1115,7 +1115,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.SalesShipmentDocNegative.GetDescription())
{
//更新源头单据数量
- ICSSalesService.SalesShipmentDocNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSSalesService.SalesShipmentDocNegative(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
BusinessCode = TransTypeEnum.SalesShipmentDocNegative.GetDescription();
}
#endregion
@@ -1123,14 +1123,14 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OtherInDoc.GetDescription())
{
//更新源头单据数量
- ICSWareHouseService.OtherInDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ 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);
+ ICSWareHouseService.DisassemblyDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
WHTransType = "11";
BusinessCode = TransTypeEnum.DisassemblyDoc.GetDescription();
}
@@ -1139,7 +1139,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.ReturnDoc.GetDescription())
{
//更新源头单据数量
- ICSWareHouseService.ReturnDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSWareHouseService.ReturnDoc(itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
BusinessCode = TransTypeEnum.ReturnDoc.GetDescription();
}
#endregion
@@ -1147,7 +1147,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.SalesReturnBack.GetDescription())
{
//更新源头单据数量
- ICSSalesService.SalesReturnBackIn(itemInfo.TransCode, itemInfo.TransSequence, itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd);
+ ICSSalesService.SalesReturnBackIn(itemInfo.TransCode, itemInfo.TransSequence, itemInfo.LotNo, itemInfo.Quantity, item.WorkPoint, cmd,language);
//入库
BusinessCode = TransTypeEnum.SalesReturnBack.GetDescription();
@@ -1163,7 +1163,7 @@ namespace ICSSoft.DataProject
if (TransType == TransTypeEnum.DisassemblyDoc.GetDescription())
{
//更新套件锁定数量
- ICSWareHouseService.DisassemblyDoc(Identification, cmd);
+ ICSWareHouseService.DisassemblyDoc(Identification, cmd,language);
}
#endregion}
}
@@ -1172,56 +1172,56 @@ namespace ICSSoft.DataProject
{
//采购入库
if (TransType == TransTypeEnum.PurchaseReceiveDoc.GetDescription())
- ICSPurchaseService.PurchaseReceiveDocERP(TransType, Identification, cmd);
+ ICSPurchaseService.PurchaseReceiveDocERP(TransType, Identification, cmd, language);
//审核的到货单
else if (TransType == TransTypeEnum.DeliveryNotice.GetDescription())
- ICSPurchaseService.DeliveryNoticeInERP(TransType, Identification, cmd);
+ ICSPurchaseService.DeliveryNoticeInERP(TransType, Identification, cmd, language);
//采购拒收
else if (TransType == TransTypeEnum.PurchaseRejectDoc.GetDescription())
- ICSPurchaseService.PurchaseRejectDocInERP(TransType, Identification, cmd);
+ ICSPurchaseService.PurchaseRejectDocInERP(TransType, Identification, cmd, language);
//审核的委外到货单
else if (TransType == TransTypeEnum.ODeliveryNotice.GetDescription())
- ICSOutsourcingService.ODeliveryNoticeInERP(TransType, Identification, cmd);
+ ICSOutsourcingService.ODeliveryNoticeInERP(TransType, Identification, cmd,language);
//委外拒收
else if (TransType == TransTypeEnum.OutsourcingRejectDoc.GetDescription())
- ICSOutsourcingService.OutsourcingRejectDocInERP(TransType, Identification, cmd);
+ 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);
+ ICSOutsourcingService.OutsourcingIssueDoNegativeERP(TransType, Identification, cmd,language);
//委外入库
else if (TransType == TransTypeEnum.OutsourcingReceiveDoc.GetDescription())
- ICSOutsourcingService.OutsourcingReceiveDocERP(TransType, Identification, cmd);
+ 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);
+ ICSManufactureService.MOIssueDocNegativeERP(TransType, Identification, cmd,language);
//生产入库
else if (TransType == TransTypeEnum.ManufactureReceiveDoc.GetDescription())
- ICSManufactureService.ManufactureReceiveDocERP(TransType, Identification, cmd);
+ ICSManufactureService.ManufactureReceiveDocERP(TransType, Identification, cmd,language);
//开立的生产入库单
else if (TransType == TransTypeEnum.ManufactureReceive.GetDescription())
- ICSManufactureService.ManufactureReceiveERP(TransType, Identification, cmd);
+ ICSManufactureService.ManufactureReceiveERP(TransType, Identification, cmd,language);
//销售退货
else if (TransType == TransTypeEnum.SalesShipmentDocNegative.GetDescription())
- ICSSalesService.SalesShipmentDocNegativeERP(TransType, Identification, cmd);
+ ICSSalesService.SalesShipmentDocNegativeERP(TransType, Identification, cmd,language);
//两步调入
else if (TransType == TransTypeEnum.TwoStepTransferDocIn.GetDescription())
- ICSWareHouseService.TwoStepTransferDocInERP(TransType, Identification, cmd);
+ ICSWareHouseService.TwoStepTransferDocInERP(TransType, Identification, cmd,language);
//销售退货-原条码
else if (TransType == TransTypeEnum.SalesReturnBack.GetDescription())
- ICSSalesService.SalesReturnBackInERP(TransType, Identification, cmd);
+ ICSSalesService.SalesReturnBackInERP(TransType, Identification, cmd,language);
//其他入库
else if (TransType == TransTypeEnum.OtherInDoc.GetDescription())
- ICSWareHouseService.OtherInDocERP(TransType, Identification, cmd);
+ ICSWareHouseService.OtherInDocERP(TransType, Identification, cmd,language);
//拆卸单
if (TransType == TransTypeEnum.DisassemblyDoc.GetDescription())
- ICSWareHouseService.DisassemblyDocERP(TransType, Identification, cmd);
+ ICSWareHouseService.DisassemblyDocERP(TransType, Identification, cmd,language);
//归还
else if (TransType == TransTypeEnum.ReturnDoc.GetDescription())
- ICSWareHouseService.ReturnDocERP(TransType, Identification, cmd);
+ ICSWareHouseService.ReturnDocERP(TransType, Identification, cmd,language);
}
DataTable table = GetData(Identification, 1, cmd);
cmd.Transaction.Commit();
@@ -1279,7 +1279,7 @@ namespace ICSSoft.DataProject
if (TransType == TransTypeEnum.PurchaseReceiveDoctNegative.GetDescription())
{
//更新源头单据数量
- ICSPurchaseService.PurchaseReceiveDoctNegative(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSPurchaseService.PurchaseReceiveDoctNegative(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language);
foreach (var itemInfo in item.detail)
{
@@ -1293,7 +1293,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OutsourcingIssueDoc.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.OutsourcingIssueDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.OutsourcingIssueDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1307,7 +1307,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OutsourcingReturnBack.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.OutsourcingReturnBack(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.OutsourcingReturnBack(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1321,7 +1321,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.MOIssueDoc.GetDescription())
{
//更新源头单据数量
- ICSManufactureService.MOIssueDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSManufactureService.MOIssueDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1335,7 +1335,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.SalesShipmentDoc.GetDescription())
{
//更新源头单据数量
- ICSSalesService.SalesShipmentDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSSalesService.SalesShipmentDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1349,7 +1349,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.TwoStepTransferDocOut.GetDescription())
{
//更新源头单据数量
- ICSWareHouseService.TwoStepTransferDocOut(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSWareHouseService.TwoStepTransferDocOut(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1363,7 +1363,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OtherOutDoc.GetDescription())
{
//更新源头单据数量
- ICSWareHouseService.OtherOutDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSWareHouseService.OtherOutDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1377,7 +1377,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.MOApply.GetDescription())
{
//更新源头单据数量
- ICSManufactureService.MOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSManufactureService.MOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1391,7 +1391,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OOApply.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.OOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.OOApply(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1405,7 +1405,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.MOIssue.GetDescription())
{
//更新源头单据数量
- ICSManufactureService.MOIssue(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSManufactureService.MOIssue(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1419,7 +1419,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OOIssue.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.OOIssue(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.OOIssue(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1433,7 +1433,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.PurchaseReceive.GetDescription())
{
//更新源头单据数量
- ICSPurchaseService.PurchaseReceive(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSPurchaseService.PurchaseReceive(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd, language);
foreach (var itemInfo in item.detail)
{
@@ -1447,7 +1447,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.OutsourcingReceiveDocNegative.GetDescription())
{
//更新源头单据数量
- ICSOutsourcingService.OutsourcingReceiveDocNegative(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSOutsourcingService.OutsourcingReceiveDocNegative(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1461,7 +1461,7 @@ namespace ICSSoft.DataProject
else if (TransType == TransTypeEnum.BrrowDoc.GetDescription())
{
//更新源头单据数量
- ICSWareHouseService.BrrowDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd);
+ ICSWareHouseService.BrrowDoc(item.TransCode, item.TransSequence, item.Quantity, item.WorkPoint, cmd,language);
foreach (var itemInfo in item.detail)
{
@@ -1477,46 +1477,46 @@ namespace ICSSoft.DataProject
{
//采购退货
if (TransType == TransTypeEnum.PurchaseReceiveDoctNegative.GetDescription())
- ICSPurchaseService.PurchaseReceiveDoctNegativeERP(TransType, Identification, cmd);
+ ICSPurchaseService.PurchaseReceiveDoctNegativeERP(TransType, Identification, cmd, language);
//委外发料
else if (TransType == TransTypeEnum.OutsourcingIssueDoc.GetDescription())
- ICSOutsourcingService.OutsourcingIssueDocERP(TransType, Identification, cmd);
+ ICSOutsourcingService.OutsourcingIssueDocERP(TransType, Identification, cmd,language);
//委外退货
else if (TransType == TransTypeEnum.OutsourcingReturnBack.GetDescription())
- ICSOutsourcingService.OutsourcingReturnBackERP(TransType, Identification, cmd);
+ ICSOutsourcingService.OutsourcingReturnBackERP(TransType, Identification, cmd,language);
//生产发料
else if (TransType == TransTypeEnum.MOIssueDoc.GetDescription())
- ICSManufactureService.MOIssueDocERP(TransType, Identification, cmd);
+ ICSManufactureService.MOIssueDocERP(TransType, Identification, cmd,language);
//销售出库
else if (TransType == TransTypeEnum.SalesShipmentDoc.GetDescription())
- ICSSalesService.SalesShipmentDocERP(TransType, Identification, cmd);
+ ICSSalesService.SalesShipmentDocERP(TransType, Identification, cmd,language);
//两步调出
else if (TransType == TransTypeEnum.TwoStepTransferDocOut.GetDescription())
- ICSWareHouseService.TwoStepTransferDocOutERP(TransType, Identification, cmd);
+ ICSWareHouseService.TwoStepTransferDocOutERP(TransType, Identification, cmd,language);
//其他出库
else if (TransType == TransTypeEnum.OtherOutDoc.GetDescription())
- ICSWareHouseService.OtherOutDocERP(TransType, Identification, cmd);
+ ICSWareHouseService.OtherOutDocERP(TransType, Identification, cmd,language);
//领料申请单发料
if (TransType == TransTypeEnum.MOApply.GetDescription())
- ICSManufactureService.MOApplyERP(TransType, Identification, cmd);
+ ICSManufactureService.MOApplyERP(TransType, Identification, cmd,language);
//委外领料申请单发料
if (TransType == TransTypeEnum.OOApply.GetDescription())
- ICSOutsourcingService.OOApplyERP(TransType, Identification, cmd);
+ ICSOutsourcingService.OOApplyERP(TransType, Identification, cmd,language);
//开立材料出库
if (TransType == TransTypeEnum.MOIssue.GetDescription())
- ICSManufactureService.MOIssueERP(TransType, Identification, cmd);
+ ICSManufactureService.MOIssueERP(TransType, Identification, cmd,language);
//开立委外材料出库
if (TransType == TransTypeEnum.OOIssue.GetDescription())
- ICSOutsourcingService.OOIssueERP(TransType, Identification, cmd);
+ ICSOutsourcingService.OOIssueERP(TransType, Identification, cmd,language);
//开立红字入库单
if (TransType == TransTypeEnum.PurchaseReceive.GetDescription())
- ICSPurchaseService.PurchaseReceiveERP(TransType, Identification, cmd);
+ ICSPurchaseService.PurchaseReceiveERP(TransType, Identification, cmd, language);
//开立委外红字入库单
if (TransType == TransTypeEnum.OutsourcingReceiveDocNegative.GetDescription())
- ICSOutsourcingService.OutsourcingReceiveDocNegativeERP(TransType, Identification, cmd);
+ ICSOutsourcingService.OutsourcingReceiveDocNegativeERP(TransType, Identification, cmd,language);
//借用
if (TransType == TransTypeEnum.BrrowDoc.GetDescription())
- ICSWareHouseService.BrrowDocERP(TransType, Identification, cmd);
+ ICSWareHouseService.BrrowDocERP(TransType, Identification, cmd,language);
}
DataTable table = GetData(Identification, 2, cmd);
@@ -1647,7 +1647,7 @@ namespace ICSSoft.DataProject
{
throw new Exception(language.GetNameByCode("WMSAPIInfo011")); //"到货单信息创建失败!");
}
- ICSPurchaseService.DeliveryNoticeERP(Code, item.WorkPoint, cmd);
+ ICSPurchaseService.DeliveryNoticeERP(Code, item.WorkPoint, cmd,language);
asncodes += "'" + item.ASNCode + item.WorkPoint + "',";
}
if (string.IsNullOrWhiteSpace(asncodes))
@@ -2448,7 +2448,7 @@ namespace ICSSoft.DataProject
{
throw new Exception(language.GetNameByCode("WMSAPIInfo011")); //"到货单信息创建失败!");
}
- ICSOutsourcingService.OutsourcingDeliveryNoticeERP(Code, item.WorkPoint, cmd);
+ ICSOutsourcingService.OutsourcingDeliveryNoticeERP(Code, item.WorkPoint, cmd,language);
asncodes += "'" + item.OASNCode + item.WorkPoint + "',";
}
if (string.IsNullOrWhiteSpace(asncodes))
@@ -3218,14 +3218,14 @@ namespace ICSSoft.DataProject
DBHelper.ExecuteNonQuery(sql, cmd);
//更新源头单据信息
- ICSWareHouseService.OneStepTransferDocIn(item.TransCode, item.TransSequence, item.WorkPoint, itemInfo.CurrentQuantity, cmd);
+ ICSWareHouseService.OneStepTransferDocIn(item.TransCode, item.TransSequence, item.WorkPoint, itemInfo.CurrentQuantity, cmd,language);
//更新条码信息
ICSWareHouseLotInfoService.WareHouseLotInfoTransfer(Identification, item.TransCode, item.TransSequence, itemInfo.WarehouseCode, itemInfo.LocationCode,
itemInfo.LotNo, itemInfo.CurrentQuantity, item.User, item.WorkPoint, "6", "21", cmd, language);
}
}
- ICSWareHouseService.OneStepTransferDocInERP(TransTypeEnum.OneStepTransferDocIn.GetDescription(), Identification, cmd);
+ ICSWareHouseService.OneStepTransferDocInERP(TransTypeEnum.OneStepTransferDocIn.GetDescription(), Identification, cmd,language);
DataTable table = GetData(Identification, 3, cmd);
cmd.Transaction.Commit();
@@ -3618,7 +3618,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static object boxGet(ICSContainer JsonData)
+ public static object ContainerGet(ICSContainer JsonData)
{
var language = LanguageHelper.GetName("WMSAPIInfo");
using (SqlConnection conn = new System.Data.SqlClient.SqlConnection(connString))
@@ -3692,7 +3692,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static DataTable boxUpdate(List JsonData)
+ public static DataTable ContainerUpdate(List JsonData)
{
var language = LanguageHelper.GetName("WMSAPIInfo");
using (SqlConnection conn = new System.Data.SqlClient.SqlConnection(connString))
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSUserPowerService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSUserPowerService.cs
index e0f3ed3..c86f977 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSUserPowerService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSUserPowerService.cs
@@ -42,9 +42,9 @@ namespace ICSSoft.DataProject
{
string sql = string.Empty;
if (string.IsNullOrWhiteSpace(info.UserId))
- throw new Exception("用户不能为空!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo176"));//"用户不能为空!");
if (string.IsNullOrWhiteSpace(info.MenuCode))
- throw new Exception("菜单不能为空!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo177"));//"菜单不能为空!");
if (string.IsNullOrWhiteSpace(info.WorkPoint))
throw new Exception(language.GetNameByCode("WMSAPIInfo004"));//"站点不能为空!"
sql = @"IF EXISTS(SELECT F_Id FROM Sys_SRM_User WHERE F_IsAdministrator='1' AND F_Id='{0}' AND F_Location='{2}')
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
index e5e1a33..aaba605 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
@@ -42,7 +42,7 @@ namespace ICSSoft.DataProject
{
sql = @"IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}')
BEGIN
- RAISERROR('条码:{0} 已入库!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo164") + @"',16,1);
RETURN
END ";
}
@@ -72,7 +72,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo165") + @"");
}
///添加日志
sql = @"INSERT INTO ICSWareHouseLotInfoLog(ID,Identification,TransCode,TransSequence,LotNo,InvCode,
@@ -95,7 +95,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
}
catch (Exception)
@@ -127,14 +127,14 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity<0)
BEGIN
- RAISERROR('条码:{0} 库存数量不足!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo167") + @"',16,1);
RETURN
END";
sql = string.Format(sql, LotNo, WorkPoint, Quantity);
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo168"));//"库存更新失败!");
}
///添加日志
sql = @"IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{2}' AND F_Location='{1}')
@@ -162,7 +162,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
}
catch (Exception)
@@ -213,7 +213,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
///更新库存
sql = @"UPDATE ICSWareHouseLotInfo SET Quantity='{2}' WHERE LotNo='{0}' AND WorkPoint='{1}'";
@@ -221,7 +221,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo168"));//"库存更新失败!");
}
///添加日志
sql = @"INSERT INTO ICSWareHouseLotInfoLog(ID,Identification,TransCode,TransSequence,LotNo,InvCode,
@@ -242,7 +242,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
}
catch (Exception)
@@ -292,17 +292,17 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
///添加库存
sql = @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity>0)
BEGIN
- RAISERROR('条码:{0} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo038") + @"',16,1);
RETURN
END
IF EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE LotNo='{0}' AND WorkPoint='{1}' AND a.Quantity<'{4}')
BEGIN
- RAISERROR('条码:{0},数量不足!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo167") + @"',16,1);
RETURN
END
@@ -312,7 +312,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存表更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo168"));//"库存表更新失败!");
}
}
catch (Exception)
@@ -363,12 +363,12 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
///添加库存
sql = @"IF NOT EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity>0)
BEGIN
- RAISERROR('条码:{0} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo038") + @"',16,1);
RETURN
END
@@ -378,7 +378,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存表更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo168"));//"库存表更新失败!");
}
}
catch (Exception)
@@ -429,12 +429,12 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
///添加库存
sql = @"IF EXISTS(SELECT a.ID FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity>0)
BEGIN
- RAISERROR('条码:{0} 已有库存!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo164") + @"',16,1);
RETURN
END
@@ -444,7 +444,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存表更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo168"));//"库存表更新失败!");
}
}
catch (Exception)
@@ -494,7 +494,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
}
catch (Exception)
@@ -523,12 +523,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSInventoryLot b ON b.LotNo='{3}' AND a.InvCode=b.InvCode AND a.WorkPoint=b.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='6000')
BEGIN
- RAISERROR('条码:{0} 与条码:{3} 物料不符,不能合并!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo170") + @"',16,1);
RETURN
END
IF NOT EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}')
BEGIN
- RAISERROR('条码:{0} 不在库存中!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo171") + @"',16,1);
RETURN
END
UPDATE ICSWareHouseLotInfo SET Quantity=ISNULL(Quantity,0)+'{2}' WHERE LotNo='{0}' AND WorkPoint='{1}'
@@ -537,21 +537,21 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("目标条码库存更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo169"));//"目标条码库存更新失败!");
}
///更新原条码库存
sql = @"UPDATE ICSWareHouseLotInfo SET Quantity=ISNULL(Quantity,0)-'{2}' WHERE LotNo='{0}' AND WorkPoint='{1}'
IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity<0)
BEGIN
- RAISERROR('条码:{0} 库存数量不足!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo167") + @"',16,1);
RETURN
END";
sql = string.Format(sql, CurrentLotNo, WorkPoint, Quantity);
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo168"));//"库存更新失败!");
}
///添加日志
sql = @"IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{2}' AND F_Location='{1}')
@@ -580,7 +580,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
}
catch (Exception)
@@ -609,14 +609,14 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Quantity<0)
BEGIN
- RAISERROR('条码:{0} 库存数量不足!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo167") + @"',16,1);
RETURN
END";
sql = string.Format(sql, LotNo, WorkPoint, Quantity);
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo168"));//"库存更新失败!");
}
#region 添加库存
//插入条码表
@@ -628,7 +628,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.LotNo FROM ICSInventoryLot a WHERE a.LotNo='{4}' AND a.WorkPoint='{1}')
BEGIN
- RAISERROR('条码:{4} 已存在,请重新扫描分批条码!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo172") + @"',16,1);
RETURN
END
INSERT INTO ICSInventoryLot(ID,LotNo,InvCode,ProductDate,ExpirationDate,Quantity,ExtensionID,Type,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
@@ -640,7 +640,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("条码表写入失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo173"));//"条码表写入失败!");
}
//插入条码单据表
sql = @"INSERT INTO ICSInventoryLotDetail(LotNo,TransCode,TransSequence,MUSER,MUSERName,MTIME,WorkPoint)
@@ -653,12 +653,12 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("条码单据表写入失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo174"));//"条码单据表写入失败!");
}
///添加库存
sql = @"IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}')
BEGIN
- RAISERROR('条码:{0} 已入库!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo164") + @"',16,1);
RETURN
END
INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
@@ -672,7 +672,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo165") + @"");
}
///添加日志
sql = @"INSERT INTO ICSWareHouseLotInfoLog(ID,Identification,TransCode,TransSequence,LotNo,InvCode,
@@ -695,7 +695,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("库存日志写入失败!");
+ throw new Exception("" + language.GetNameByCode("WMSAPIInfo166") + @"");
}
#endregion
}
@@ -716,7 +716,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void WareHouseLotInfoLogUpdate(string TransType, string SourceDetailID, string Identification, string ID, string DetailID, string Code, string Sequence, SqlCommand cmd)
+ public static void WareHouseLotInfoLogUpdate(string TransType, string SourceDetailID, string Identification, string ID, string DetailID, string Code, string Sequence, SqlCommand cmd, Dictionary language)
{
string ERPupdate = string.Empty;
try
@@ -1032,7 +1032,7 @@ namespace ICSSoft.DataProject
ERPupdate = string.Format(ERPupdate, SourceDetailID, Identification, ID, DetailID, Code, Sequence);
if (!DBHelper.ExecuteNonQuery(ERPupdate, cmd))
{
- throw new Exception(TransType + "回写日志失败!");
+ throw new Exception(TransType + language.GetNameByCode("WMSAPIInfo175"));//"回写日志失败!");
}
}
catch (Exception ex)
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs
index cbbe826..ca3decf 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseService.cs
@@ -30,7 +30,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OneStepTransferDocIn(string TransCode,string TransSequence, string WorkPoint,string Quantity, SqlCommand cmd)
+ public static void OneStepTransferDocIn(string TransCode,string TransSequence, string WorkPoint,string Quantity, SqlCommand cmd, Dictionary language)
{
try
{
@@ -40,14 +40,14 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSTransfer a
WHERE a.TransferNO='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Type='1' AND a.TransferQuantity
///
///
- public static void OneStepTransferDocInERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OneStepTransferDocInERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -72,7 +72,7 @@ namespace ICSSoft.DataProject
WHERE b.TransferNO+b.WorkPoint IN (SELECT a.TransCode+a.WorkPoint FROM ICSWareHouseLotInfoLog a WHERE a.Identification='{0}')
AND b.Type = '1' AND b.Quantity!=b.TransferQuantity)
BEGIN
- RAISERROR('调拨单下的条码必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo097") + @"',16,1);
RETURN
END
SELECT b.TransferID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -95,7 +95,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -106,7 +106,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -126,7 +126,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void TwoStepTransferDocOut(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void TwoStepTransferDocOut(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -137,12 +137,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('两步调出订单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo146") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('两步调出订单:{0},行号:{3} 不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo147") + @"',16,1);
RETURN
END
UPDATE a SET OutQuantity=ISNULL(OutQuantity,0)+'{2}'
@@ -154,7 +154,7 @@ namespace ICSSoft.DataProject
INNER JOIN ICSTransfer b ON a.TransferDetailID=b.TransferDetailID AND a.WorkPoint=b.WorkPoint
WHERE a.OutCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void TwoStepTransferDocOutERP(string TransType, string Identification, SqlCommand cmd)
+ public static void TwoStepTransferDocOutERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -187,7 +187,7 @@ namespace ICSSoft.DataProject
WHERE b.OutCode+b.WorkPoint IN (SELECT a.TransCode+a.WorkPoint FROM ICSWareHouseLotInfoLog a WHERE a.Identification='{0}')
AND b.Quantity!=b.OutQuantity)
BEGIN
- RAISERROR('两步调出单下的条码必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo098") + @"',16,1);
RETURN
END
SELECT b.OutID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -211,7 +211,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -222,7 +222,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -242,7 +242,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void TwoStepTransferDocIn(string TransCode, string TransSequence, string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void TwoStepTransferDocIn(string TransCode, string TransSequence, string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
//需要关联其他入库单
try
@@ -257,12 +257,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo137") + @"',16,1);
RETURN
END
UPDATE Otin SET InQuantity=ISNULL(InQuantity,0)+'{2}'
@@ -279,12 +279,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSWareHouseLotInfo a ON a.LotNo=log.LotNo AND a.WorkPoint=log.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND Otin.InCode='{2}' AND Otin.Sequence='{3}' AND Otin.Quantity
///
///
- public static void TwoStepTransferDocInERP(string TransType, string Identification, SqlCommand cmd)
+ public static void TwoStepTransferDocInERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -309,7 +309,7 @@ namespace ICSSoft.DataProject
WHERE b.InCode+b.WorkPoint IN (SELECT a.TransCode+a.WorkPoint FROM ICSWareHouseLotInfoLog a WHERE a.Identification='{0}')
AND b.Quantity!=b.InQuantity)
BEGIN
- RAISERROR('两步调入单下的条码必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo099") + @"',16,1);
RETURN
END
SELECT b.InID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -333,7 +333,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -344,7 +344,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -364,7 +364,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OtherOutDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OtherOutDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -374,12 +374,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('其他出库订单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo151") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('其他出库订单:{0},行号:{3} 不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo152") + @"',16,1);
RETURN
END
UPDATE a SET OutQuantity=ISNULL(OutQuantity,0)+'{2}'
@@ -389,7 +389,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSOtherOut a
WHERE a.OutCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void OtherOutDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OtherOutDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -421,7 +421,7 @@ namespace ICSSoft.DataProject
WHERE b.OutCode+b.WorkPoint IN (SELECT a.TransCode+a.WorkPoint FROM ICSWareHouseLotInfoLog a WHERE a.Identification='{0}')
AND b.Quantity!=b.OutQuantity)
BEGIN
- RAISERROR('其他出库单下的条码必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo100") + @"',16,1);
RETURN
END
SELECT b.OutID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -444,7 +444,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -455,7 +455,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -475,7 +475,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void OtherInDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void OtherInDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -487,12 +487,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo137") + @"',16,1);
RETURN
END
UPDATE c SET InQuantity=ISNULL(InQuantity,0)+'{2}'
@@ -505,12 +505,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSOtherIn c ON b.TransCode=c.InCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Quantity
///
///
- public static void OtherInDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void OtherInDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -534,7 +534,7 @@ namespace ICSSoft.DataProject
WHERE b.InCode+b.WorkPoint IN (SELECT a.TransCode+a.WorkPoint FROM ICSWareHouseLotInfoLog a WHERE a.Identification='{0}')
AND b.Quantity!=b.InQuantity)
BEGIN
- RAISERROR('其他入库单下的条码必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo101") + @"',16,1);
RETURN
END
SELECT b.InID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -557,7 +557,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -568,7 +568,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -588,7 +588,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void DisassemblyDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void DisassemblyDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -600,12 +600,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status!='1')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不是开立状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo137") + @"',16,1);
RETURN
END
UPDATE c SET DABDOCQuantity=ISNULL(DABDOCQuantity,0)+'{2}'
@@ -618,14 +618,14 @@ namespace ICSSoft.DataProject
INNER JOIN ICSDisassemblyDoc c ON b.TransCode=c.DABDOCCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Quantity
///
///
- public static void DisassemblyDoc(string Identification, SqlCommand cmd)
+ public static void DisassemblyDoc(string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -655,7 +655,7 @@ namespace ICSSoft.DataProject
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
- throw new Exception("拆卸单套件更新失败!");
+ throw new Exception(language.GetNameByCode("WMSAPIInfo158"));//"拆卸单套件更新失败!");
}
}
catch (Exception)
@@ -670,7 +670,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void DisassemblyDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void DisassemblyDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -679,7 +679,7 @@ namespace ICSSoft.DataProject
WHERE b.DABDOCCode+b.WorkPoint IN (SELECT a.TransCode+a.WorkPoint FROM ICSWareHouseLotInfoLog a WHERE a.Identification='{0}')
AND b.Quantity!=b.DABDOCQuantity)
BEGIN
- RAISERROR('拆卸单下的条码必须一次性扫描完成!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo102") + @"',16,1);
RETURN
END
SELECT b.DABDOCID AS ID,a.MUSER AS [User],SYSDATETIME() AS MTime,con.Enable AS UpdateTodoQuantity,conStock.Enable AS UpdateStock,a.WorkPoint
@@ -702,7 +702,7 @@ namespace ICSSoft.DataProject
{
foreach (DataRow dr in dt.Rows)
{
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, dr["ID"].ToString(), Identification, "", "", "", "", cmd, language);
}
}
catch (Exception ex)
@@ -713,7 +713,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:"+result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080")+result.Message);
}
#endregion
}
@@ -733,7 +733,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void BrrowDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void BrrowDoc(string TransCode, string TransSequence, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -743,12 +743,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('借用单:{0},行号:{3} 不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo159") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('借用单:{0},行号:{3} 不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo160") + @"',16,1);
RETURN
END
UPDATE a SET BrrowQuantity=ISNULL(BrrowQuantity,0)+'{2}'
@@ -758,7 +758,7 @@ namespace ICSSoft.DataProject
IF EXISTS(SELECT a.ID FROM ICSBrrow a
WHERE a.BrrowCode='{0}' AND a.Sequence='{3}' and a.WorkPoint='{1}' AND a.Quantity
///
///
- public static void BrrowDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void BrrowDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -825,7 +825,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["OtherOutCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["OtherOutCode"].ToString(), det["Sequence"].ToString(), cmd, language);
}
}
}
@@ -837,7 +838,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
@@ -857,7 +858,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void ReturnDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd)
+ public static void ReturnDoc(string LotNo, string Quantity, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
@@ -869,12 +870,12 @@ namespace ICSSoft.DataProject
IF (@Status IS NULL)
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不存在!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo081") + @"',16,1);
RETURN
END
ELSE IF (@Status!='2')
BEGIN
- RAISERROR('条码:{0} 对应的源头单据不是审核状态!',16,1);
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo142") + @"',16,1);
RETURN
END
UPDATE c SET ReturnQuantity=ISNULL(ReturnQuantity,0)+'{2}'
@@ -887,12 +888,12 @@ namespace ICSSoft.DataProject
INNER JOIN ICSReturn c ON b.TransCode=c.ReturnCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND c.Quantity
///
///
- public static void ReturnDocERP(string TransType, string Identification, SqlCommand cmd)
+ public static void ReturnDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary language)
{
try
{
@@ -951,7 +952,8 @@ namespace ICSSoft.DataProject
foreach (var detail in resdetail)
{
JObject det = (JObject)detail;
- ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(), det["DetailID"].ToString(), jo["OtherInCode"].ToString(), det["Sequence"].ToString(), cmd);
+ ICSWareHouseLotInfoService.WareHouseLotInfoLogUpdate(TransType, det["SourceDetailID"].ToString(), Identification, jo["ID"].ToString(),
+ det["DetailID"].ToString(), jo["OtherInCode"].ToString(), det["Sequence"].ToString(), cmd,language);
}
}
}
@@ -963,7 +965,7 @@ namespace ICSSoft.DataProject
}
else
{
- throw new Exception("ERP接口调用失败:" + result.Message);
+ throw new Exception(language.GetNameByCode("WMSAPIInfo080") + result.Message);
}
#endregion
}
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/TransferBoxController.cs b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/TransferBoxController.cs
index 49c6e6d..de7eec0 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/TransferBoxController.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/TransferBoxController.cs
@@ -27,7 +27,7 @@ namespace ICSSoft.WebAPI.Controllers
///
[HttpPost]
[Route("api/Container/Get")]
- public HttpResponseMessage BoxGet([FromBody] object JsonData)
+ public HttpResponseMessage ContainerGet([FromBody] object JsonData)
{
log.Info("获取包装信息传入值" + JsonData);
try
@@ -38,7 +38,7 @@ namespace ICSSoft.WebAPI.Controllers
model = JsonConvert.DeserializeObject(JsonData.ToString());
//ICSTransferBox action = new ICSTransferBox();
//var resultStr = action.boxGet(model);
- var resultStr = ICSSubmitService.boxGet(model);
+ var resultStr = ICSSubmitService.ContainerGet(model);
if (resultStr != null)
{
@@ -75,7 +75,7 @@ namespace ICSSoft.WebAPI.Controllers
///
[HttpPost]
[Route("api/Container/Update")]
- public HttpResponseMessage BoxUpdate([FromBody] object JsonData)
+ public HttpResponseMessage ContainerUpdate([FromBody] object JsonData)
{
log.Info("提交包装信息传入值" + JsonData);
try
@@ -86,7 +86,7 @@ namespace ICSSoft.WebAPI.Controllers
model = JsonConvert.DeserializeObject>(JsonData.ToString());
//ICSTransferBox action = new ICSTransferBox();
//var resultStr = action.boxUpdate(model);
- var resultStr = ICSSubmitService.boxUpdate(model);
+ var resultStr = ICSSubmitService.ContainerUpdate(model);
res.Success = true;
res.Message = LanguageHelper.GetNameSingle("WMSAPI001");// "接口调用成功!";