|
|
@ -29,7 +29,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<a.IssueQuantity) |
|
|
|
BEGIN |
|
|
|
RAISERROR('单据号:{0},行号:{3} 对应的源头单据已发数量不能大于应发数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo091") + @"',16,1); |
|
|
|
RETURN |
|
|
|
END";
|
|
|
|
|
|
|
@ -65,7 +65,7 @@ namespace ICSSoft.DataProject |
|
|
|
|
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外领料单更新失败!"); |
|
|
|
throw new Exception("" + language.GetNameByCode("WMSAPIInfo107") + @""); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -80,7 +80,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OutsourcingIssueDocERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void OutsourcingIssueDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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 |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<a.IssueQuantity) |
|
|
|
BEGIN |
|
|
|
RAISERROR('单据号:{0},行号:{3} 对应的源头单据已发数量不能大于应发数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo091") + @"',16,1); |
|
|
|
RETURN |
|
|
|
END";
|
|
|
|
|
|
|
@ -190,7 +191,7 @@ namespace ICSSoft.DataProject |
|
|
|
|
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外领料申请单更新失败!"); |
|
|
|
throw new Exception("" + language.GetNameByCode("WMSAPIInfo110") + @""); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -205,7 +206,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OOApplyERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void OOApplyERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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 |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<a.IssueQuantity) |
|
|
|
BEGIN |
|
|
|
RAISERROR('单据号:{0},行号:{3} 对应的源头单据已发数量不能大于应发数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo091") + @"',16,1); |
|
|
|
RETURN |
|
|
|
END";
|
|
|
|
|
|
|
@ -314,7 +316,7 @@ namespace ICSSoft.DataProject |
|
|
|
|
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外材料出库单更新失败!"); |
|
|
|
throw new Exception("" + language.GetNameByCode("WMSAPIInfo113") + @""); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -329,7 +331,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OOIssueERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void OOIssueERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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 |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<c.IssueNegQuantity) |
|
|
|
BEGIN |
|
|
|
RAISERROR('条码:{0}对应的源头单据已退数量不能大于应退数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo114") + @"',16,1); |
|
|
|
END";
|
|
|
|
sql = string.Format(sql, LotNo, WorkPoint, Quantity); |
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外退料单更新失败!"); |
|
|
|
throw new Exception(language.GetNameByCode("WMSAPIInfo115"));//"委外退料单更新失败!");
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -426,7 +428,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OutsourcingIssueDoNegativeERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void OutsourcingIssueDoNegativeERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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<ICSERPReturnIssueNEG> negList = JsonConvert.DeserializeObject<List<ICSERPReturnIssueNEG>>(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 |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OutsourcingDeliveryNoticeERP(string ODNCode, string WorkPoint, SqlCommand cmd) |
|
|
|
public static void OutsourcingDeliveryNoticeERP(string ODNCode, string WorkPoint, SqlCommand cmd, Dictionary<string, string> 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 |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<c.InQuantity) |
|
|
|
BEGIN |
|
|
|
RAISERROR('条码:{0} 对应的源头单据已入库数量不能大于订单数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo083") + @"',16,1); |
|
|
|
END";
|
|
|
|
sql = string.Format(sql, LotNo, WorkPoint, Quantity); |
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外退料单更新失败!"); |
|
|
|
throw new Exception(language.GetNameByCode("WMSAPIInfo115"));//"委外退料单更新失败!");
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -709,7 +712,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OutsourcingReceiveDocERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void OutsourcingReceiveDocERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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 |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<c.RCVQuantity) |
|
|
|
BEGIN |
|
|
|
RAISERROR('条码:{0} 对应的源头单据已入库数量不能大于订单数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo083") + @"',16,1); |
|
|
|
END";
|
|
|
|
sql = string.Format(sql, LotNo, WorkPoint, Quantity); |
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外到货单更新失败!"); |
|
|
|
throw new Exception(language.GetNameByCode("WMSAPIInfo117"));//"委外到货单更新失败!");
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -837,7 +841,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void ODeliveryNoticeInERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void ODeliveryNoticeInERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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 |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<c.RCVQuantity) |
|
|
|
BEGIN |
|
|
|
RAISERROR('条码:{0} 对应的源头单据已入库数量不能大于订单数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo083") + @"',16,1); |
|
|
|
END";
|
|
|
|
sql = string.Format(sql, LotNo, WorkPoint, Quantity); |
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外拒收单更新失败!"); |
|
|
|
throw new Exception(language.GetNameByCode("WMSAPIInfo118"));//"委外拒收单更新失败!");
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -965,7 +970,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OutsourcingRejectDocInERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void OutsourcingRejectDocInERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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 |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<a.RCVQuantity AND ODNType='2') |
|
|
|
BEGIN |
|
|
|
RAISERROR('单据号:{0},行号:{3} 对应的源头单据已退数量不能大于应退数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo087") + @"',16,1); |
|
|
|
RETURN |
|
|
|
END";
|
|
|
|
|
|
|
@ -1069,7 +1074,7 @@ namespace ICSSoft.DataProject |
|
|
|
|
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外退货单更新失败!"); |
|
|
|
throw new Exception(language.GetNameByCode("WMSAPIInfo121"));//"委外退货单更新失败!");
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -1084,7 +1089,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OutsourcingReturnBackERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void OutsourcingReturnBackERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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 |
|
|
|
/// <param name="Quantity"></param>
|
|
|
|
/// <param name="WorkPoint"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
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<string, string> 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<a.RCVQuantity) |
|
|
|
BEGIN |
|
|
|
RAISERROR('单据号:{0},行号:{3} 对应的源头单据已发数量不能大于应发数量!',16,1); |
|
|
|
RAISERROR('" + language.GetNameByCode("WMSAPIInfo091") + @"',16,1); |
|
|
|
RETURN |
|
|
|
END";
|
|
|
|
|
|
|
@ -1194,7 +1200,7 @@ namespace ICSSoft.DataProject |
|
|
|
|
|
|
|
if (!DBHelper.ExecuteNonQuery(sql, cmd)) |
|
|
|
{ |
|
|
|
throw new Exception("委外红字入库单更新失败!"); |
|
|
|
throw new Exception(language.GetNameByCode("WMSAPIInfo124"));//"委外红字入库单更新失败!");
|
|
|
|
} |
|
|
|
} |
|
|
|
catch (Exception) |
|
|
@ -1209,7 +1215,7 @@ namespace ICSSoft.DataProject |
|
|
|
/// <param name="TransType"></param>
|
|
|
|
/// <param name="Identification"></param>
|
|
|
|
/// <param name="cmd"></param>
|
|
|
|
public static void OutsourcingReceiveDocNegativeERP(string TransType, string Identification, SqlCommand cmd) |
|
|
|
public static void OutsourcingReceiveDocNegativeERP(string TransType, string Identification, SqlCommand cmd, Dictionary<string, string> 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
|
|
|
|
} |
|
|
|
xxxxxxxxxx