diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs
index aca0dfc..c7afafc 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSPurchaseService.cs
@@ -406,6 +406,53 @@ namespace ICSSoft.DataProject
}
#endregion
+ #region 叉车采购入库
+ ///
+ /// 叉车采购入库
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void DeliveryNoticeForkLift(string ContainerCode, SqlCommand cmd, Dictionary language)
+ {
+ try
+ {
+ string lotsql = @" select A.LotNo,C.Quantity,B.WorkPoint from ICSContainerLot A
+ LEFT JOIN ICSContainer B ON B.ID=A.ContainerID AND B.WorkPoint=A.WorkPoint
+ LEFT JOIN ICSInventoryLot C ON C.LotNo=A.LotNo AND C.WorkPoint=A.WorkPoint
+ where B.ContainerCode='{0}'";
+ lotsql = string.Format(lotsql, ContainerCode);
+ DataTable lotdt = DBHelper.SQlReturnData(lotsql, cmd);
+ foreach (DataRow dr in lotdt.Rows)
+ {
+ string sql = @" UPDATE c SET RCVQuantity=ISNULL(RCVQuantity,0)+'{2}'
+ FROM ICSInventoryLot a
+ INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint
+ 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'
+ IF EXISTS(SELECT a.LotNo FROM ICSInventoryLot a
+ INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint
+ 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
/// 采购拒收
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
index f3e13b3..45260df 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSSubmitService.cs
@@ -1121,7 +1121,8 @@ namespace ICSSoft.DataProject
a.InvCode,
inv.InvName,
inv.InvStd,
- a.Quantity
+ a.Quantity,
+ con.LocationCode
FROM ICSWareHouseLotInfo a
LEFT JOIN ICSContainerLot conlot ON a.LotNo=conlot.LotNo AND a.WorkPoint=conlot.WorkPoint
LEFT JOIN ICSContainer con ON conlot.ContainerID=con.ID AND conlot.WorkPoint=con.WorkPoint
@@ -2871,6 +2872,69 @@ namespace ICSSoft.DataProject
}
}
///
+ /// 叉车出入库
+ /// BusinessCode,TransType 两个类型
+ ///
+ ///
+ public static DataTable LOTStockChangeForkLift(LOTStockForkLiftModel JsonData)
+ {
+ var language = LanguageHelper.GetName("WMSAPIInfo");
+ if (JsonData == null)
+ {
+ throw new Exception(language.GetNameByCode("WMSAPIInfo007"));//"传送数据为空!"
+ }
+
+ using (SqlConnection conn = new System.Data.SqlClient.SqlConnection(connString))
+ {
+ conn.Open();
+ SqlTransaction sqlTran = conn.BeginTransaction();
+ SqlCommand cmd = new SqlCommand();
+ cmd.Transaction = sqlTran;
+ cmd.Connection = conn;
+ string BusinessCode = string.Empty;
+ try
+ {
+ string TransType = string.Empty;
+ string Identification = Guid.NewGuid().ToString();
+ TransType = JsonData.TaskType;
+ if (TransType == "PTWY")
+ {
+ //更新源头单据数量
+ ICSPurchaseService.DeliveryNoticeForkLift(JsonData.PalletID, cmd, language);
+ BusinessCode = TransTypeEnum.DeliveryNotice.GetDescription();
+ //入库
+ ICSWareHouseLotInfoService.WareHouseLotInfoUpForkLift(Identification, JsonData.DestBin, JsonData.PalletID,
+ "叉车", "采购入库-采购到货单", "2", cmd, language);
+ }
+ //上传ERP
+ if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["UploadERP"]))
+ {
+ //审核的到货单
+ if (TransType == TransTypeEnum.DeliveryNotice.GetDescription())
+ ICSPurchaseService.DeliveryNoticeInERP(TransType, Identification, cmd, language, BusinessCode);
+ }
+ DataTable table = GetData(Identification, 1, cmd);
+ cmd.Transaction.Commit();
+ return table;
+ }
+ catch (Exception ex)
+ {
+ if (cmd.Transaction != null)
+ cmd.Transaction.Rollback();
+ log.Error(ex.Message);
+ throw new Exception(ex.Message);
+ }
+ finally
+ {
+ if (conn.State == ConnectionState.Open)
+ {
+ conn.Close();
+ }
+ conn.Dispose();
+ }
+ }
+ }
+ ///
/// 下架
///
///
@@ -6885,7 +6949,7 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
{
msg = string.Format(language.GetNameByCode("WMSAPIInfo203"));//"推荐库位不能为空!"
}
- if (item.LocationCode == "")
+ if (item.LocationCode == "" && item.ContainerType != "窄巷道叉车(木托盘)")
{
msg = string.Format(language.GetNameByCode("WMSAPIInfo206"));//"位置编码不能为空!"
}
@@ -6900,7 +6964,7 @@ WHERE WorkPoint='{0}' AND Quantity>ISNULL(TransferQuantity, 0) order by Transfer
if (TransType == TransTypeEnum.ContainerBind.GetDescription())
{
//料架条码绑定
- ICSWareHouseLotInfoService.ContainerBind(item.LotNo, item.ContainerCode, item.ContainerType, item.LocationCode, item.User, item.WorkPoint, cmd, language);
+ ICSWareHouseLotInfoService.ContainerBind(item.LotNo, item.ContainerCode, item.ContainerType, item.LocationCode, item.RecomendBinCode, item.User, item.WorkPoint, cmd, language);
}
else
{
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSUserPowerService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSUserPowerService.cs
index c86f977..791e980 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSUserPowerService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSUserPowerService.cs
@@ -111,7 +111,7 @@ namespace ICSSoft.DataProject
if (string.IsNullOrWhiteSpace(info.WorkPointCode))
throw new Exception(language.GetNameByCode("WMSAPIInfo004"));//"站点不能为空!"
sql = @"SELECT ID,ColCode,ColName,Enable,MTIME,MUSER,MUSERName,WorkPoint,EATTRIBUTE1
- FROM ICSExtensionEnable WHERE WorkPoint='{0}'";
+ FROM ICSExtensionEnable WHERE WorkPoint='{0}'and Enable='1'";
sql = string.Format(sql, info.WorkPointCode);
dt = DBHelper.SQlReturnData(sql, cmd);
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
index 857d426..caa2ba9 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.DataProject/ICSWareHouseLotInfoService.cs
@@ -413,7 +413,120 @@ namespace ICSSoft.DataProject
throw;
}
}
+ ///
+ /// 添加库存
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static void WareHouseLotInfoUpForkLift(string Identification, string LocationCode, string ContainerCode, string User,
+ string TransType, string BusinessCode, SqlCommand cmd, Dictionary language)
+ {
+ try
+ {
+
+ #region 正常入库
+ ///添加库存(原条码退回,更新库存;新条码直接入库)
+ //stirng locationcode = "";
+ string sql = string.Empty;
+ string locationcode = "";
+ string lotsql = @" select A.LotNo,C.Quantity,B.WorkPoint from ICSContainerLot A
+ LEFT JOIN ICSContainer B ON B.ID=A.ContainerID AND B.WorkPoint=A.WorkPoint
+ LEFT JOIN ICSInventoryLot C ON C.LotNo=A.LotNo AND C.WorkPoint=A.WorkPoint
+ where B.ContainerCode='{0}'";
+ lotsql = string.Format(lotsql, ContainerCode);
+ DataTable lotdt = DBHelper.SQlReturnData(lotsql, cmd);
+ foreach (DataRow dr in lotdt.Rows)
+ {
+ sql = @"
+ IF EXISTS(SELECT a.LotNo FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}')
+ BEGIN
+ IF EXISTS(SELECT a.LotNO FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND a.Quantity=0)
+ BEGIN
+ UPDATE a SET a.Quantity=ISNULL(a.Quantity,0)+'{3}',WarehouseCode=e.WarehouseCode,LocationCode=d.LocationCode
+ From ICSWareHouseLotInfo a
+ INNER JOIN ICSLocation d ON d.LocationCode='{4}' AND a.WorkPoint=d.WorkPoint
+ INNER JOIN ICSWarehouse e ON d.WHID=e.ID AND d.WorkPoint=e.WorkPoint
+ WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'
+ END
+ ELSE IF EXISTS(SELECT a.LotNO FROM ICSWareHouseLotInfo a WHERE a.LotNo='{0}' AND a.WorkPoint='{1}' AND a.LocationCode='{4}')
+ BEGIN
+ UPDATE ICSWareHouseLotInfo SET Quantity=ISNULL(Quantity,0)+'{3}'
+ WHERE LotNo='{0}' AND WorkPoint='{1}'
+ END
+ ELSE IF('" + locationcode + @"' != '{4}')
+ BEGIN
+ RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo395"), "{4}", locationcode) + @"', 16, 1);
+ RETURN
+ END
+ END
+ ELSE
+ BEGIN
+ IF EXISTS(SELECT il.InvCode FROM ICSInventoryLocation il
+ INNER JOIN ICSInventoryLot a ON a.InvCode=il.InvCode AND a.WorkPoint=il.WorkPoint
+ WHERE il.Enable='1' AND a.LotNo='{0}' AND a.WorkPoint='{1}')
+ BEGIN
+ IF NOT EXISTS(SELECT il.InvCode FROM ICSInventoryLocation il
+ INNER JOIN ICSInventoryLot a ON a.InvCode=il.InvCode AND a.WorkPoint=il.WorkPoint
+ WHERE il.Enable='1' AND a.LotNo='{0}' AND a.WorkPoint='{1}' AND il.LocationCode='{4}')
+ BEGIN
+ RAISERROR('" + language.GetNameByCode("WMSAPIInfo180") + @"',16,1);
+ RETURN
+ END
+ END
+ INSERT INTO ICSWareHouseLotInfo(ID,LotNO,WarehouseCode,LocationCode,InvCode,Quantity,InDate,LockQuantity,MUSER,MUSERName,MTIME,WorkPoint,EATTRIBUTE1)
+ SELECT NEWID(),a.LotNo ,e.WarehouseCode,d.LocationCode,a.InvCode ,'{3}',SYSDATETIME(),'0','{2}','{2}',SYSDATETIME() ,a.WorkPoint ,''
+ FROM ICSInventoryLot a
+ INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint
+ --INNER JOIN ICSOApplyNegDetail c ON b.TransCode=c.OApplyNegCode AND b.TransSequence=c.Sequence AND b.WorkPoint=c.WorkPoint
+ INNER JOIN ICSLocation d ON d.LocationCode='{4}' AND a.WorkPoint=d.WorkPoint
+ INNER JOIN ICSWarehouse e ON d.WHID=e.ID AND d.WorkPoint=e.WorkPoint
+ WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'
+ END";
+ sql = string.Format(sql, dr["LotNo"].ToString(), dr["WorkPoint"].ToString(), User, dr["Quantity"].ToString(), LocationCode);
+
+ if (!DBHelper.ExecuteNonQuery(sql, cmd))
+ {
+ throw new Exception(language.GetNameByCode("WMSAPIInfo165"));
+ }
+
+ ///添加日志
+ sql = @"INSERT INTO ICSWareHouseLotInfoLog(ID,Identification,TransCode,TransSequence,LotNo,InvCode,
+ FromWarehouseCode,FromLocationCode,ToWarehouseCode,ToLocationCode,Quantity,
+ Memo,Lock,TransType,BusinessCode,ERPUpload,ERPID,
+ ERPDetailID,ERPCode,ERPSequence,MUSER,MUSERName,
+ MTIME,WorkPoint,EATTRIBUTE1)
+ SELECT NEWID(),'{3}',b.TransCode,b.TransSequence,a.LotNo ,a.InvCode ,
+ '','',c.WarehouseCode,c.LocationCode,'{6}',
+ '','0','{4}','{5}','0','',
+ '','','','{2}','{2}',
+ SYSDATETIME() ,a.WorkPoint ,''
+ FROM ICSInventoryLot a
+ INNER JOIN ICSInventoryLotDetail b ON a.LotNo=b.LotNo AND a.WorkPoint=b.WorkPoint
+ INNER JOIN ICSWareHouseLotInfo c ON a.LotNo=c.LotNo AND a.WorkPoint=c.WorkPoint
+ WHERE a.LotNo='{0}' AND a.WorkPoint='{1}'
+ ";
+ sql = string.Format(sql, dr["LotNo"].ToString(), dr["WorkPoint"].ToString(), User, Identification, TransType, BusinessCode, dr["Quantity"].ToString());
+
+ if (!DBHelper.ExecuteNonQuery(sql, cmd))
+ {
+ throw new Exception(language.GetNameByCode("WMSAPIInfo166"));
+ }
+ }
+ #endregion
+ }
+ catch (Exception)
+ {
+ throw;
+ }
+ }
///
/// 添加库存(货柜)
///
@@ -2369,38 +2482,104 @@ namespace ICSSoft.DataProject
///
///
///
- public static void ContainerBind(string LotNo, string ContainerCode, string ContainerType, string LocationCode, string User, string WorkPoint, SqlCommand cmd, Dictionary language)
+ public static void ContainerBind(string LotNo, string ContainerCode, string ContainerType, string LocationCode,string RecomendBinCode, string User, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
///添加日志
- string sql = @"IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{3}' AND F_Location='{2}')
- BEGIN
- RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo060"), "{3}") + @"',16,1);
- RETURN
- END
- IF NOT EXISTS (SELECT * FROM ICSContainerLot WHERE ContainerID=
- (SELECT ID FROM ICSContainer WHERE ContainerCode='{1}' AND WorkPoint='{2}'))
- BEGIN
- update ICSContainer set LocationCode='{4}',EATTRIBUTE1='已绑定' where ContainerCode='{1}' AND WorkPoint='{2}'
- INSERT INTO ICSContainerLot
- (ID,ContainerID,LotNo,MUSER,MUSERName,WorkPoint,MTIME,EATTRIBUTE1)
- SELECT NEWID(),ID,'{0}','{3}'
- ,(SELECT F_RealName FROM Sys_SRM_User WHERE F_Account='{3}' AND F_Location='{2}'),'{2}',GETDATE(),'{4}' FROM ICSContainer
- WHERE ContainerCode='{1}' AND WorkPoint='{2}'
- END
- ELSE
- BEGIN
- update ICSContainer set LocationCode='{4}',EATTRIBUTE1='已绑定' where ContainerCode='{1}' AND WorkPoint='{2}'
- UPDATE ICSContainerLot SET LotNo='{0}' WHERE ContainerID=
- (SELECT ID FROM ICSContainer WHERE ContainerCode='{1}' AND WorkPoint='{2}')
- END
- ";
- sql = string.Format(sql, LotNo, ContainerCode, WorkPoint, User, ContainerType, LocationCode);
+ if (ContainerType != "窄巷道叉车(木托盘)")
+ {
+ string sql = @"IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{3}' AND F_Location='{2}')
+ BEGIN
+ RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo060"), "{3}") + @"',16,1);
+ RETURN
+ END
+ IF NOT EXISTS (SELECT * FROM ICSContainerLot WHERE ContainerID=
+ (SELECT ID FROM ICSContainer WHERE ContainerCode='{1}' AND WorkPoint='{2}'))
+ BEGIN
+ update ICSContainer set LocationCode='{4}',EATTRIBUTE1='已绑定' where ContainerCode='{1}' AND WorkPoint='{2}'
+ INSERT INTO ICSContainerLot
+ (ID,ContainerID,LotNo,MUSER,MUSERName,WorkPoint,MTIME,EATTRIBUTE1)
+ SELECT NEWID(),ID,'{0}','{3}'
+ ,(SELECT F_RealName FROM Sys_SRM_User WHERE F_Account='{3}' AND F_Location='{2}'),'{2}',GETDATE(),'{4}' FROM ICSContainer
+ WHERE ContainerCode='{1}' AND WorkPoint='{2}'
+ END
+ ELSE
+ BEGIN
+ update ICSContainer set LocationCode='{4}',EATTRIBUTE1='已绑定' where ContainerCode='{1}' AND WorkPoint='{2}'
+ UPDATE ICSContainerLot SET LotNo='{0}' WHERE ContainerID=
+ (SELECT ID FROM ICSContainer WHERE ContainerCode='{1}' AND WorkPoint='{2}')
+ END
+ ";
+ sql = string.Format(sql, LotNo, ContainerCode, WorkPoint, User, ContainerType, LocationCode);
- if (!DBHelper.ExecuteNonQuery(sql, cmd))
+ if (!DBHelper.ExecuteNonQuery(sql, cmd))
+ {
+ throw new Exception("容器:" + ContainerCode + "与条码:" + LotNo + "绑定失败!");
+ }
+ }
+ else
{
- throw new Exception("料架:" + ContainerCode + "与条码:" + LotNo + "绑定失败!");
+ string sql = @"IF NOT EXISTS(SELECT F_Account FROM Sys_SRM_User WHERE F_Account='{3}' AND F_Location='{2}')
+ BEGIN
+ RAISERROR('" + string.Format(language.GetNameByCode("WMSAPIInfo060"), "{3}") + @"',16,1);
+ RETURN
+ END
+ IF NOT EXISTS (SELECT * FROM ICSContainerLot WHERE ContainerID=
+ (SELECT ID FROM ICSContainer WHERE ContainerCode='{1}' AND WorkPoint='{2}'))
+ BEGIN
+ INSERT INTO ICSContainerLot
+ (ID,ContainerID,LotNo,MUSER,MUSERName,WorkPoint,MTIME,EATTRIBUTE1)
+ SELECT NEWID(),ID,'{0}','{3}'
+ ,(SELECT F_RealName FROM Sys_SRM_User WHERE F_Account='{3}' AND F_Location='{2}'),'{2}',GETDATE(),'{4}' FROM ICSContainer
+ WHERE ContainerCode='{1}' AND WorkPoint='{2}'
+ END
+ ELSE
+ BEGIN
+ UPDATE ICSContainerLot SET LotNo='{0}' WHERE ContainerID=
+ (SELECT ID FROM ICSContainer WHERE ContainerCode='{1}' AND WorkPoint='{2}')
+ END
+ ";
+ sql = string.Format(sql, LotNo, ContainerCode, WorkPoint, User, ContainerType, LocationCode);
+
+ if (!DBHelper.ExecuteNonQuery(sql, cmd))
+ {
+ throw new Exception("容器:" + ContainerCode + "与条码:" + LotNo + "绑定失败!");
+ }
+ if (Convert.ToBoolean(System.Configuration.ConfigurationManager.AppSettings["UploadForkLift"]))
+ {
+ string ForkLiftUrl = System.Configuration.ConfigurationManager.AppSettings["ForkLiftUrl"];
+ string Year = DateTime.Now.Year.ToString();
+ string Month = DateTime.Now.Month.ToString().PadLeft(2, '0');
+ string Day = DateTime.Now.Day.ToString().PadLeft(2, '0');
+ string Hour = DateTime.Now.Hour.ToString().PadLeft(2, '0');
+ string Minute = DateTime.Now.Minute.ToString().PadLeft(2, '0');
+ string Second = DateTime.Now.Second.ToString().PadLeft(2, '0');
+ string InspectJosn = "{";
+ InspectJosn += "\"ID\":\"" + Year + Month + Day + Hour + Minute + Second + "\",";
+ InspectJosn += "\"ForkliftCode\": \"" + ContainerCode + "\",";
+ InspectJosn += "\"TaskType\": \"PTWY\",";
+ InspectJosn += "\"DestBin\": \"" + RecomendBinCode + "\"";
+ InspectJosn += "}";
+ RestHelper rest = new RestHelper(ForkLiftUrl, HttpVerb.POST);
+ rest.PostData = InspectJosn;
+ string strResult = rest.MakeRequest();
+ //string resultstr = HTTPHelper.Post(ERPUrl.AGVBineURL, InspectJosn);
+ ForkLiftStartTaskResultModel result = JsonConvert.DeserializeObject(strResult);
+ if (result.Ret == 1)
+ {
+ sql = @"update ICSContainer set LocationCode='{2}',EATTRIBUTE1='已搬运' where ContainerCode='{0}' AND WorkPoint='{1}'";
+ sql = string.Format(sql, ContainerCode, WorkPoint, LocationCode);
+ if (!DBHelper.ExecuteNonQuery(sql, cmd))
+ {
+ throw new Exception(language.GetNameByCode("WMSAPIInfo207"));//料架状态更新失败
+ }
+ }
+ else
+ {
+ throw new Exception(result.RetMsg);
+ }
+ }
}
//else
//{
@@ -2529,7 +2708,7 @@ namespace ICSSoft.DataProject
///
///
///
- public static void CallAGVStartTask(string ContainerCode,string TransType, string LocationCode, string User, string WorkPoint, SqlCommand cmd, Dictionary language)
+ public static void CallAGVStartTask(string ContainerCode, string TransType, string LocationCode, string User, string WorkPoint, SqlCommand cmd, Dictionary language)
{
try
{
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.Entity/ForkLiftStartTaskModel.cs b/ICSSoft.WMS.WebAPI/ICSSoft.Entity/ForkLiftStartTaskModel.cs
new file mode 100644
index 0000000..dba45ff
--- /dev/null
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.Entity/ForkLiftStartTaskModel.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ICSSoft.Entity
+{
+ public class ForkLiftStartTaskResultModel
+ {
+ ///
+ /// 结果编码(0:成功)
+ ///
+ public int Ret { get; set; }
+ ///
+ /// 返回信息
+ ///
+ public string RetMsg { get; set; }
+ }
+
+
+}
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.Entity/ICSSoft.Entity.csproj b/ICSSoft.WMS.WebAPI/ICSSoft.Entity/ICSSoft.Entity.csproj
index bb49d30..98ccec8 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.Entity/ICSSoft.Entity.csproj
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.Entity/ICSSoft.Entity.csproj
@@ -53,6 +53,7 @@
+
@@ -70,6 +71,7 @@
+
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.Entity/LOTStockForkLiftModel.cs b/ICSSoft.WMS.WebAPI/ICSSoft.Entity/LOTStockForkLiftModel.cs
new file mode 100644
index 0000000..8142bf2
--- /dev/null
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.Entity/LOTStockForkLiftModel.cs
@@ -0,0 +1,39 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace ICSSoft.Entity
+{
+ public class LOTStockForkLiftModel
+ {
+ ///
+ /// 叉车编号
+ ///
+ public string ForkliftCode { get; set; }
+ ///
+ /// 仓库编号
+ ///
+ public string WareCode { get; set; }
+ ///
+ /// 巷道号
+ ///
+ public string LaneCode { get; set; }
+ ///
+ /// 任务类型【PTWY上架,RETN返仓,INTL移库,PICK出库,INVE盘点】
+ ///
+ public string TaskType { get; set; }
+ ///
+ /// 托盘号
+ ///
+ public string PalletID { get; set; }
+ ///
+ /// 源库位
+ ///
+ public string SourceBin { get; set; }
+ ///
+ /// 目标库位
+ ///
+ public string DestBin { get; set; }
+ }
+}
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/WMSBarCoreController.cs b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/WMSBarCoreController.cs
index f10be2f..6207337 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/WMSBarCoreController.cs
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Controllers/WMSBarCoreController.cs
@@ -492,6 +492,48 @@ namespace ICSSoft.WebAPI.Controllers
return result;
}
+ //
+ /// 上架添加(叉车用)
+ ///
+ ///
+ ///
+ [HttpPost]
+ [Route("api/LOTStockChangeForkLift/Create")]
+ public HttpResponseMessage LOTStockChangeForkLift([FromBody] object JsonData)
+ {
+ log.Info("上架传入值" + JsonData);
+ try
+ {
+ if (JsonData != null && !string.IsNullOrWhiteSpace(JsonData.ToString()) && JsonData.ToString() != "[]")
+ {
+ LOTStockForkLiftModel model = new LOTStockForkLiftModel();
+ model = JsonConvert.DeserializeObject(JsonData.ToString());
+ //WMSBarCoreService action = new WMSBarCoreService();
+ //var resultStr = action.LOTStockCreate(model);
+ var resultStr = ICSSubmitService.LOTStockChangeForkLift(model);
+ res.Success = true;
+ res.Message = LanguageHelper.GetNameSingle("WMSAPI001");// "接口调用成功!";
+ if (resultStr != null && resultStr.Rows.Count > 0 && resultStr.ToString() != "[]")
+ {
+ res.Data = resultStr;
+ }
+ }
+ }
+ catch (Exception ex)
+ {
+ log.Error("转换失败:" + ex.ToString());
+ res.Success = false;
+ res.Message = ex.Message;
+ }
+ finally
+ {
+ str = JsonConvert.SerializeObject(res);
+ result.Content = new StringContent(str, Encoding.GetEncoding("UTF-8"), "application/json");
+ }
+ log.Debug("上架返回值:" + str);
+ return result;
+ }
+
/*
///
/// 测试获取管控方式
diff --git a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config
index 0eb9cae..18095a3 100644
--- a/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config
+++ b/ICSSoft.WMS.WebAPI/ICSSoft.WMS.WebAPI/Web.config
@@ -16,8 +16,10 @@
+
+