diff --git a/Epost.BLL/OrderBLL.cs b/Epost.BLL/OrderBLL.cs
index ccac2e0..017bc0a 100644
--- a/Epost.BLL/OrderBLL.cs
+++ b/Epost.BLL/OrderBLL.cs
@@ -955,5 +955,18 @@ namespace Epost.BLL
}
#endregion
+ #region 查询小格口是否都已绑定
+ public bool getSmallLocList(string loc)
+ {
+ return dal.getSmallLocList(loc);
+ }
+
+ #endregion
+ #region 打印箱号 释放格口
+ public bool CreateBoxInfo(string boxcode, string loc, string type)
+ {
+ return dal.CreateBoxInfo(boxcode, loc, type);
+ }
+ #endregion
}
}
diff --git a/Epost.BLL/OrderControlBLL.cs b/Epost.BLL/OrderControlBLL.cs
index f7f6db0..741dba8 100644
--- a/Epost.BLL/OrderControlBLL.cs
+++ b/Epost.BLL/OrderControlBLL.cs
@@ -854,20 +854,27 @@ namespace Epost.BLL
if (data.Parameter.Length <= 2)
{
#region 扫描小格口号
- DataTable quedt = queueBLL.getQueueList();
+ DataTable quedt = queueBLL.getQueueList();
if (quedt != null && quedt.Rows.Count > 0)
{
- LogHelper.WriteLogInfo(quedt.Rows[0]["sku"].ToString()+"绑定小格口" + data.Parameter);
+ LogHelper.WriteLogInfo(quedt.Rows[0]["sku"].ToString() + "绑定小格口" + data.Parameter);
//更新订单记录
- orderbll.UpdateSkuLoc(quedt.Rows[0]["sku"].ToString(),data.Parameter);
+ orderbll.UpdateSkuLoc(quedt.Rows[0]["sku"].ToString(), data.Parameter);
}
- else {
+ else
+ {
LogHelper.WriteLogInfo("没有可绑定物料" + data.Parameter);
}
#endregion
}
- else {
+ else if (data.Parameter.Length > 2 && data.Parameter.Length <= 5)
+ {
+ LogHelper.WriteLogInfo("扫描满箱");
+ FinshLoc(data.Parameter);
+ }
+ else
+ {
#region 扫描SKU
//根据扫描商品内码获取商品码
data.ScanCode = data.Parameter;
@@ -915,6 +922,35 @@ namespace Epost.BLL
}
}
}
+
+ #endregion
+
+ #region 满箱打印标签
+ public bool FinshLoc(string loc)
+ {
+ bool isfin = orderbll.getSmallLocList(loc);
+ if (isfin)
+ {
+ DataTable locdt= addrBLL.GetALLList(" and location='"+loc+"'");
+ string type = string.Empty;
+ if (locdt != null && locdt.Rows.Count > 0)
+ {
+ type = locdt.Rows[0]["addresstype"].ToString();
+
+ }
+ //生成唯一箱号条码
+ string boxcode = ((DateTime.Now.ToUniversalTime().Ticks - 621355968000000000) / 10000000).ToString() + loc;
+ LogHelper.WriteLogInfo(boxcode.ToString());
+ bool bo = orderbll.CreateBoxInfo(boxcode, loc, type);
+ return bo;
+ }
+ else
+ {
+ logBLL.SaveShowMesError("小格口未完全绑定", "小格口未完全绑定,请绑定后再释放!");
+ return false;
+ }
+ }
+
#endregion
#region 复核显示
diff --git a/Epost.DAL/AddressstorageDAL.cs b/Epost.DAL/AddressstorageDAL.cs
index 86c9024..3dfcaf7 100644
--- a/Epost.DAL/AddressstorageDAL.cs
+++ b/Epost.DAL/AddressstorageDAL.cs
@@ -696,7 +696,7 @@ namespace Epost.DAL
#region 获取所有地址列表
public DataTable GetALLList(string strwhere)
{
- string sql = string.Format("select * from v_address where 1=1 " + strwhere + " ");
+ string sql = string.Format("select * from addressstorage where 1=1 " + strwhere + " ");
DataTable dt = db.GetsqlForDT(sql);
return dt;
diff --git a/Epost.DAL/OrdersDAL.cs b/Epost.DAL/OrdersDAL.cs
index 1824ca5..1e96416 100644
--- a/Epost.DAL/OrdersDAL.cs
+++ b/Epost.DAL/OrdersDAL.cs
@@ -2493,6 +2493,78 @@ namespace Epost.DAL
}
}
#endregion
+ #region 查询小格口是否都已绑定
+ public bool getSmallLocList(string loc)
+ {
+ string sql = string.Format("select top 1 * from orders where (partcode is null or partcode='') and oprationstate=3 and fromlocation='{0}'", loc);
+ DataTable dt = db.GetsqlForDT(sql);
+ if (dt != null && dt.Rows.Count > 0)
+ {
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+ #endregion
+ #region 生成箱号
+ public bool CreateBoxInfo(string boxcode, string loc, string type)
+ {
+ try
+ {
+ //添加打印信息
+ string printsql = string.Format("insert into print_sku(orderid,matchid,state,addtime,type) values('{0}','{1}','{2}','{3}','{4}')",
+ boxcode, loc, "0", DateTime.Now.ToString(), type);
+ int x = db.InsertSql(printsql);
+ if (x > 0)
+ {
+ //更新订单状态为已完成
+ string sql = string.Format("update orders set state =3,boxcode='{0}' where fromlocation='{1}' and state<>3 and oprationstate=3",
+ boxcode, loc);
+ long y = db.UpdateSql(sql);
+ LogHelper.WriteLogInfo(y + "更新订单完成" + sql);
+ //查询此货位是否存在未播商品
+ //string querysql = string.Format("select * from orders where oprationstate<>3 and fromlocation='{0}'",loc);
+ //DataTable querydt = db.GetsqlForDT(querysql);
+ //if (querydt != null && querydt.Rows.Count > 0)
+ //{
+ // LogHelper.WriteLogInfo(loc+"还有商品未分配完,不释放格口");
+ // //不释放格口
+ // return true;
+ //}
+ //else {
+ // //释放格口
+ // string upsql = string.Format("update addressstorage set bkaddress=0,addresstype='' where location='{0}'", loc);
+ // long b = db.UpdateSql(upsql);
+ // if (b > 0)
+ // {
+ // return true;
+ // }
+ // else
+ // {
+ // LogHelper.WriteLogInfo("释放格口失败" + upsql);
+ // return false;
+ // }
+ //}
+ return true;
+ }
+ else
+ {
+ LogHelper.WriteLogInfo("添加打印箱标签失败" + printsql);
+ return false;
+ }
+
+ }
+ catch (Exception ex)
+ {
+
+ LogHelper.WriteLogInfo("完成格口异常" + ex.ToString());
+ return false;
+ }
+
+ }
+ #endregion
}
}
diff --git a/Epost.TestToolsWeb/Epost.DPS.csproj.user b/Epost.TestToolsWeb/Epost.DPS.csproj.user
index 044be83..b1a2138 100644
--- a/Epost.TestToolsWeb/Epost.DPS.csproj.user
+++ b/Epost.TestToolsWeb/Epost.DPS.csproj.user
@@ -11,7 +11,7 @@
False
600
E:\WORK\代码管理\T系列\播种\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml
- Debug|Any CPU
+ Release|Any CPU
diff --git a/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user b/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user
index d367141..835c7ef 100644
--- a/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user
+++ b/Epost.TestToolsWeb/Properties/PublishProfiles/Toolsweb.pubxml.user
@@ -7,7 +7,7 @@
<_PublishTargetUrl>D:\驿传\T系列\taitan_songjiang_dengdai
- True|2024-12-27T08:58:01.4437668Z;True|2023-12-29T17:18:53.8690686+08:00;True|2023-12-26T15:40:46.3666722+08:00;True|2023-12-25T15:43:42.7553160+08:00;True|2023-12-15T15:23:23.0482897+08:00;True|2023-12-15T13:44:34.3203359+08:00;False|2023-12-15T13:42:34.6149508+08:00;True|2023-12-14T17:25:24.5353788+08:00;True|2023-11-30T19:07:23.8812051+08:00;True|2023-04-23T15:53:28.0062911+08:00;True|2023-04-22T10:28:09.9896404+08:00;True|2023-04-20T10:35:53.5768979+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;
+ True|2025-01-10T07:38:19.0722445Z;True|2024-12-27T16:58:01.4437668+08:00;True|2023-12-29T17:18:53.8690686+08:00;True|2023-12-26T15:40:46.3666722+08:00;True|2023-12-25T15:43:42.7553160+08:00;True|2023-12-15T15:23:23.0482897+08:00;True|2023-12-15T13:44:34.3203359+08:00;False|2023-12-15T13:42:34.6149508+08:00;True|2023-12-14T17:25:24.5353788+08:00;True|2023-11-30T19:07:23.8812051+08:00;True|2023-04-23T15:53:28.0062911+08:00;True|2023-04-22T10:28:09.9896404+08:00;True|2023-04-20T10:35:53.5768979+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;
@@ -33,19 +33,19 @@
04/04/2018 15:45:12
- 12/27/2024 16:57:57
+ 01/10/2025 15:44:50
- 12/27/2024 16:57:57
+ 01/10/2025 15:44:50
02/24/2020 15:29:24
- 12/27/2024 16:57:36
+ 01/10/2025 15:37:54
- 12/27/2024 16:57:36
+ 01/10/2025 15:37:54
04/29/2020 16:50:14
@@ -63,31 +63,31 @@
10/23/2017 13:15:20
- 12/27/2024 16:57:37
+ 01/10/2025 15:44:40
- 12/27/2024 16:57:37
+ 01/10/2025 15:44:40
08/26/2020 18:09:48
- 12/27/2024 16:57:36
+ 01/10/2025 15:37:54
- 12/27/2024 16:57:36
+ 01/10/2025 15:37:54
- 12/27/2024 16:57:40
+ 01/10/2025 15:44:42
- 12/27/2024 16:57:40
+ 01/10/2025 15:44:42
- 12/27/2024 16:57:36
+ 01/10/2025 15:37:53
- 12/27/2024 16:57:36
+ 01/10/2025 15:37:53
09/06/2018 11:57:11
@@ -5658,7 +5658,7 @@
05/30/2022 16:58:47
- 12/27/2024 16:57:42
+ 01/10/2025 15:44:44
04/04/2018 15:45:12
@@ -7578,7 +7578,7 @@
07/04/2022 14:22:38
- 12/27/2024 16:57:41
+ 01/10/2025 15:38:00
\ No newline at end of file