lilili 1 year ago
parent
commit
75b40f9894
  1. 22
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
  2. 33
      ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
  3. 2
      ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/WMSBarCoreController.cs

22
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs

@ -3430,7 +3430,7 @@ namespace ICSSoft.DataProject
foreach (var itemInfo in JsonData.DATA.EXP_ORDINI_RIGHE_STO)
{
//更新源头单据数量
ICSPurchaseService.DeliveryNoticeInForHG(JsonData.DATA.EXP_ORDINI[0].ORD_ORDINE, itemInfo.STO_HOSTINF, JsonData.DATA.EXP_ORDINI[0].ORD_CLIENTE, cmd, language,itemInfo.STO_EFF_QTA);
ICSPurchaseService.DeliveryNoticeInForHG(JsonData.DATA.EXP_ORDINI[0].ORD_ORDINE, itemInfo.STO_HOSTINF, JsonData.DATA.EXP_ORDINI[0].ORD_CLIENTE, cmd, language, itemInfo.STO_EFF_QTA);
BusinessCode = TransTypeEnum.DeliveryNotice.GetDescription<DBValue>();
//生成条码的同时入库
ICSWareHouseLotInfoService.WareHouseLotInfoUpForHG(Identification, JsonData.DATA.EXP_ORDINI[0].ORD_ORDINE, itemInfo.STO_HOSTINF
@ -5891,7 +5891,7 @@ namespace ICSSoft.DataProject
RAISERROR('{3}',16,1);
RETURN
END";
sql = string.Format(sql, item.WarehouseCode, item.WorkPoint, item.LocationCode, errorMessage,item.LotNo);
sql = string.Format(sql, item.WarehouseCode, item.WorkPoint, item.LocationCode, errorMessage, item.LotNo);
DBHelper.ExecuteNonQuery(sql, cmd);
//更新条码信息
@ -7113,10 +7113,10 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
//获取第一个数据的料架编码
string fistContainerCode = JsonData.FirstOrDefault().ContainerCode;
//获取第一个条码数据
string fistLotNO= JsonData.FirstOrDefault().LotNo;
string fistLotNO = JsonData.FirstOrDefault().LotNo;
//查询第一个条码的仓库和库位信息
var tableData=ICSWareHouseLotInfoService.GetWHCodeArea(fistLotNO, cmd);
if (tableData.Rows.Count==0)
var tableData = ICSWareHouseLotInfoService.GetWHCodeArea(fistLotNO, cmd);
if (tableData.Rows.Count == 0)
{
throw new Exception(string.Format(language.GetNameByCode("WMSAPIInfo038"), fistLotNO));
}
@ -7148,7 +7148,7 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
{
msg = string.Format(language.GetNameByCode("WMSAPIInfo206"));//"位置编码不能为空!"
}
if (item.ContainerCode!=fistContainerCode)
if (item.ContainerCode != fistContainerCode)
{
msg = string.Format(language.GetNameByCode("WMSAPIInfo474"));//"所传的料架编码不一致,调用失败!"
}
@ -7167,7 +7167,7 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
{
throw new Exception(string.Format(language.GetNameByCode("WMSAPIInfo038"), item.LotNo));
}
else if (tableModel.Rows[0]["WHCode"].ToString()!= tableData.Rows[0]["WHCode"].ToString())
else if (tableModel.Rows[0]["WHCode"].ToString() != tableData.Rows[0]["WHCode"].ToString())
{
throw new Exception(string.Format(language.GetNameByCode("WMSAPIInfo475"), item.LotNo));
}
@ -7250,7 +7250,7 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
{
msg = string.Format(language.GetNameByCode("WMSAPIInfo197"));//"料架不能为空!"
}
if (item.TransCode.Count<=0)
if (item.TransCode.Count <= 0)
{
msg = language.GetNameByCode("WMSAPIInfo001");//单据为空
}
@ -7614,7 +7614,7 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
}
#endregion
#region 叉车搬运结束后回调(入库)
#region 叉车搬运结束后回调(入库:PTWY上架 出库:PICK出库
public static ForkLiftResult ForkLiftTaskEndIn(ForkLiftCallBackModel JsonData, string Jsonstr)
{
var language = LanguageHelper.GetName("WMSAPIInfo");
@ -7653,7 +7653,7 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
}
else
{
ICSWareHouseLotInfoService.ActionForkLiftTaskEnd(JsonData.TaskID, cmd, language);
ICSWareHouseLotInfoService.ActionForkLiftTaskEnd(JsonData.TaskID, JsonData.TaskType, JsonData.DestBin, cmd, language);
}
res.Ret = 1;
res.RetMsg = "success";// "接口调用成功!";
@ -8424,7 +8424,7 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
if (!string.IsNullOrEmpty(JsonData.INVCode))
{
string strInvCode = "";
string[] InvCodeList= JsonData.INVCode.Split(',');
string[] InvCodeList = JsonData.INVCode.Split(',');
foreach (string INVCode in InvCodeList)
{
if (strInvCode == "")

33
ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs

@ -3489,10 +3489,14 @@ namespace ICSSoft.DataProject
/// <param name="TaskID"></param>
/// <param name="cmd"></param>
/// <param name="language"></param>
public static void ActionForkLiftTaskEnd(string TaskID, SqlCommand cmd, Dictionary<string, string> language)
public static void ActionForkLiftTaskEnd(string TaskID, string TaskType, string DestBin, SqlCommand cmd, Dictionary<string, string> language)
{
try
{
if (TaskType == "PTWY上架")
{
#region 入库
#region 获取任务ID相关的料架条码及目标库位信息
string ContainerCode = "";
string StartLocation = "";
@ -3712,6 +3716,23 @@ namespace ICSSoft.DataProject
}
}
#endregion
#endregion
}
else if (TaskType == "PICK出库")
{
#region 出库(仅记录叉车搬运到的出库点位,用于后面的回库)
string sql = @" Update ICSForkLiftTaskLog SET EndLocation='{0}'
where ReqCode='{1}'";
sql = string.Format(sql, DestBin, TaskID);
if (!DBHelper.ExecuteNonQuery(sql, cmd))
{
//throw new Exception("任务编码:" + TaskCode + ",日志记录失败");//料架状态更新失败
}
#endregion
}
}
catch (Exception ex)
{
@ -3748,7 +3769,7 @@ namespace ICSSoft.DataProject
sql = string.Format(sql, containerCode, User, tranCodes.FirstOrDefault());
var table = DBHelper.SQlReturnData(sql, cmd);
if (table.Rows.Count<=0)
if (table.Rows.Count <= 0)
{
throw new Exception("单据对应的工位不存在,操作失败");
}
@ -3761,16 +3782,16 @@ namespace ICSSoft.DataProject
END;
IF NOT EXISTS( SELECT ID FROM ICSMOApply WHERE ApplyCode='{0}' AND Desks='{1}')
BEGIN
RAISERROR('"+language.GetNameByCode("WMSAPIInfo477") + @"',16,1);
RAISERROR('" + language.GetNameByCode("WMSAPIInfo477") + @"',16,1);
RETURN
END;
IF EXISTS(select ID from ICSContainerReceiptsNumber where ContainerCode='{2}' AND TransCode='{0}')
BEGIN
RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo479"), "{0}","{2}") + @"',16,1);
RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo479"), "{0}", "{2}") + @"',16,1);
RETURN
END;
INSERT INTO ICSContainerReceiptsNumber SELECT NEWID(),'{0}','{2}',F_Account,F_RealName,GETDATE(),NULL,NULL,NULL,NULL,NULL FROM Sys_SRM_User WHERE F_Account='{3}' ";
sqlCheck= string.Format(sqlCheck, tranCode, table.Rows[0]["Desks"].ToString(),containerCode, User);
sqlCheck = string.Format(sqlCheck, tranCode, table.Rows[0]["Desks"].ToString(), containerCode, User);
if (!DBHelper.ExecuteNonQuery(sqlCheck, cmd))
{
throw new Exception("单据新增失败");
@ -3787,7 +3808,7 @@ namespace ICSSoft.DataProject
/// </summary>
/// <param name="LotNo"></param>
/// <param name="cmd"></param>
public static DataTable GetWHCodeArea(string LotNo,SqlCommand cmd)
public static DataTable GetWHCodeArea(string LotNo, SqlCommand cmd)
{
try
{

2
ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/WMSBarCoreController.cs

@ -2834,7 +2834,7 @@ namespace ICSSoft.WebAPI.Controllers
}
#endregion
#region 提供给叉车调用的回写接口,用于叉车完成搬运任务后回传任务编号,WMS入库并过账SAP(入库)
#region 提供给叉车调用的回写接口,用于叉车完成搬运任务后回传任务编号,WMS入库并过账SAP(入库:PTWY上架 出库:PICK出库
/// <summary>
/// 提供给AGV调用的回写接口
/// </summary>

Loading…
Cancel
Save