This commit is contained in:
jl
2024-12-21 18:38:51 +08:00
parent bad533bcc1
commit adab2c3392
5 changed files with 67 additions and 61 deletions

View File

@ -940,9 +940,9 @@ namespace Epost.BLL
return dal.IsFinishWorkByCar(endcount, matchid, block);
}
public bool UpdateStateByCar(string matchid, string block = "", string sku = "")
public bool UpdateStateByCar(string matchid, string area,string block = "", string sku = "")
{
return dal.UpdateStateByCar(matchid, block, sku);
return dal.UpdateStateByCar(matchid,area, block, sku);
}
public bool IsFinishWork(int endcount, string block, string usercode = "", string area = "", string sku = "", string shopid = "", string matchid = "")

View File

@ -289,44 +289,41 @@ namespace Epost.BLL
queueBLL.UpdateQueueTaskArea_Car(qumodel);
#endregion
#region
// showSummaryMes(model.Sku, block, area, Convert.ToInt32(block), null, model.Tolocation, model.Matchid);
#endregion
Thread.Sleep(30);
#region
bool blockfinish = orderbll.IsFinishWorkByCar(1, model.Matchid, block);
if (blockfinish)
{
#region
//bool blockfinish = orderbll.IsFinishWorkByCar(1, model.Matchid, block);
//if (blockfinish)
//{
// #region 点亮显示
show.Title = "当前波次分播完成";
show.Contents = "拍下熄灭所有设备\r请扫描继续作业";
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
show.Qty = "0";
show.Type = 8;
show.Block = block;
show.Islock = false;
show.IsTwinkle = 1;
// show.Title = "当前波次分播完成";
// show.Contents = "拍下熄灭所有设备\r请扫描继续作业";
// show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
// show.Qty = "0";
// show.Type = 8;
// show.Block = block;
// show.Islock = false;
// show.IsTwinkle = 1;
comBLL.ShowBoxMessage_M(show);
#endregion
// comBLL.ShowBoxMessage_M(show);
// #endregion
bool allfinish = orderbll.IsFinishWorkByCar(1, model.Matchid);
if (allfinish)//判断整个波次是否已完成
{ //更新state状态为已完成
orderbll.UpdateStateByCar(model.Matchid);
}
//删除波次信息
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == block);
UserCacheDAL.UpdateUserCodeList(ulist, EUserCommend.Execute);
// bool allfinish = orderbll.IsFinishWorkByCar(1, model.Matchid);
// if (allfinish)//判断整个波次是否已完成
// { //更新state状态为已完成
// orderbll.UpdateStateByCar(model.Matchid);
// }
// //删除波次信息
// List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == block);
// UserCacheDAL.UpdateUserCodeList(ulist, EUserCommend.Execute);
}
//}
#endregion
#region sku播完回传
// orderbll.UpdateStateByCar(model.Matchid, "", model.Sku);
orderbll.UpdateStateByCar(model.Matchid,area, block, model.Sku);
#endregion
#region sku

View File

@ -510,11 +510,11 @@ namespace Epost.BLL
List<LabelParamModel> list = new List<LabelParamModel>();
//查询当前通道sku是否有任务
DataTable dt = orderbll.getOrderListBysku(block, sku,area, matchid);
if (dt == null || dt.Rows.Count == 0)
{
dt = orderbll.getOrderHisListBysku(block, sku, area, matchid);
//回显挂起
}
//if (dt == null || dt.Rows.Count == 0)
//{
// dt = orderbll.getOrderHisListBysku(block, sku, area, matchid);
// //回显挂起
//}
if (dt != null && dt.Rows.Count > 0)
{

View File

@ -90,7 +90,7 @@ namespace Epost.DAL
string sql = string.Empty;
if (!string.IsNullOrEmpty(area))
{
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, corlorcode, address, ControlIP,area, block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_ordershis where sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + " order by layer,slist ",
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, corlorcode, address, ControlIP,area, block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + " order by layer,slist ",
sku,
block, area);
@ -98,7 +98,7 @@ namespace Epost.DAL
}
else
{
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, corlorcode, address, ControlIP, area , block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_ordershis where sku = '{0}' and block = '{1}' " + strwhere + " order by layer,slist ",
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, corlorcode, address, ControlIP, area , block,boxcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where sku = '{0}' and block = '{1}' " + strwhere + " order by layer,slist ",
sku,
block);
@ -189,7 +189,7 @@ namespace Epost.DAL
strwhere += " and matchid = '" + matchid + "'";
}
string sql = string.Format("select sum(Quantity) as SumQuantity, Sum(checkquantity) as SumCkQuantity, Discount,unit,wholeunit,matchid ,goodscode,goodsname from v_ordershis where sku='{0}' and oprationstate<>3 and block='{1}' " + strwhere +" group by sku, Discount,goodsname,unit,wholeunit,matchid ,goodscode",
string sql = string.Format("select sum(Quantity) as SumQuantity, Sum(checkquantity) as SumCkQuantity, Discount,unit,wholeunit,matchid ,goodscode,goodsname from v_orders where sku='{0}' and oprationstate<>3 and block='{1}' " + strwhere +" group by sku, Discount,goodsname,unit,wholeunit,matchid ,goodscode",
sku,
block);
@ -646,7 +646,7 @@ namespace Epost.DAL
// }
// truequantity = trueqty + 1;
// }
string upsql = string.Format("update orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity='{1}',state=3 where matchid='{2}' and id='{4}' ",
string upsql = string.Format("update orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity='{1}' where matchid='{2}' and id='{4}' ",
DateTime.Now.ToString(),
truequantity,
matchid,
@ -717,30 +717,39 @@ namespace Epost.DAL
#endregion
#region
public bool UpdateStateByCar(string matchid, string block = "", string sku = "")
public bool UpdateStateByCar(string matchid,string area, string block = "", string sku = "")
{
try
{
string strwhere = string.Empty;
if (!string.IsNullOrEmpty(block))
{
strwhere = " and workblock='" + block + "'";
strwhere += " and block='" + block + "'";
}
if (!string.IsNullOrEmpty(sku))
{
strwhere += " and area='" + area + "'";
}
if (!string.IsNullOrEmpty(sku))
{
strwhere += " and sku='" + sku + "'";
}
string upsql = string.Format("update orders set state=3 where matchid = '{0}'" + strwhere,
string upsql = string.Format("insert into ordershis([id] ,[orderid] ,[sku],[matchid],[quantity],[tolocation],[batchid],[orderstate] ,[truequantity] ,[checkquantity] ,[downdate] ,[lighttime] ,[oprationtime] ,[oprationstate] ,[shopid] ,[classes] ,[oprationcode]\r\n ,[boxcode] ,[goodscode] ,[corlorcode] ,[discount] ,[barcode] ,[goodsname] ,[tasktype] ,[prino] ,[wmsboxcode] ,[orderway] ,[wmsorderid] ,[shopname] ,[state] ,[warehouseid] ,[workblock] ,[unit] ,[wholeunit] ) select [id],[orderid],[sku],[matchid],[quantity],[tolocation],[batchid],[orderstate],[truequantity],[checkquantity],[downdate],[lighttime],[oprationtime] ,[oprationstate],[shopid],[classes],[oprationcode],[boxcode],[goodscode],[corlorcode],[discount],[barcode],[goodsname],[tasktype] ,[prino],[wmsboxcode],[orderway],[wmsorderid],[shopname],[state],[warehouseid],[workblock],[unit],[wholeunit] from v_orders where matchid = '{0}'" + strwhere,
matchid);
LogHelper.WriteLogInfo("修改波次拣货状态" + upsql);
long x = db.UpdateSql(upsql);
LogHelper.WriteLogInfo("加入历史" + upsql);
long x = db.InsertSql(upsql);
if (x > 0)
{
string sql = "update ordershis set state=3 where state=0";
db.UpdateSql(sql);
return true;
return false;
}
else { return false; }
}
catch (Exception ex)
{
LogHelper.WriteLogInfo("修改当前小车拣货状态" + ex.Message);
LogHelper.WriteLogInfo("加入历史异常" + ex.Message);
return false;
}

View File

@ -7,7 +7,7 @@
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<_PublishTargetUrl>D:\驿传\Wuxidingshi_DAS</_PublishTargetUrl>
<History>True|2024-12-10T11:10:26.6514077Z;True|2024-12-10T18:30:34.7211512+08:00;True|2024-12-09T14:06:46.4112259+08:00;True|2024-12-03T14:23:26.2134334+08:00;True|2024-11-27T18:53:48.7373661+08:00;True|2024-11-27T14:27:33.0840789+08:00;True|2024-11-27T14:08:15.6442660+08:00;True|2024-11-27T12:10:03.9412549+08:00;True|2024-11-27T11:45:31.3775097+08:00;True|2024-11-27T11:32:00.8297320+08:00;True|2024-11-23T20:50:04.5476409+08:00;False|2024-11-04T17:48:25.2781696+08:00;True|2024-11-01T16:04:56.3535724+08:00;True|2024-09-01T10:13:37.1598955+08:00;True|2024-08-31T17:27:57.5375469+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;</History>
<History>True|2024-12-19T07:11:44.2536385Z;True|2024-12-10T19:10:26.6514077+08:00;True|2024-12-10T18:30:34.7211512+08:00;True|2024-12-09T14:06:46.4112259+08:00;True|2024-12-03T14:23:26.2134334+08:00;True|2024-11-27T18:53:48.7373661+08:00;True|2024-11-27T14:27:33.0840789+08:00;True|2024-11-27T14:08:15.6442660+08:00;True|2024-11-27T12:10:03.9412549+08:00;True|2024-11-27T11:45:31.3775097+08:00;True|2024-11-27T11:32:00.8297320+08:00;True|2024-11-23T20:50:04.5476409+08:00;False|2024-11-04T17:48:25.2781696+08:00;True|2024-11-01T16:04:56.3535724+08:00;True|2024-09-01T10:13:37.1598955+08:00;True|2024-08-31T17:27:57.5375469+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;</History>
<LastFailureDetails />
</PropertyGroup>
<ItemGroup>
@ -33,19 +33,19 @@
<publishTime>04/04/2018 15:45:12</publishTime>
</File>
<File Include="bin/App_global.asax.compiled">
<publishTime>12/10/2024 19:10:22</publishTime>
<publishTime>12/19/2024 15:11:40</publishTime>
</File>
<File Include="bin/App_global.asax.dll">
<publishTime>12/10/2024 19:10:22</publishTime>
<publishTime>12/19/2024 15:11:40</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>02/24/2020 15:29:24</publishTime>
</File>
<File Include="bin/Common.dll">
<publishTime>12/10/2024 19:09:06</publishTime>
<publishTime>12/19/2024 15:11:21</publishTime>
</File>
<File Include="bin/Common.pdb">
<publishTime>12/10/2024 19:09:06</publishTime>
<publishTime>12/19/2024 15:11:21</publishTime>
</File>
<File Include="bin/ComposerSDK.dll">
<publishTime>04/29/2020 16:50:14</publishTime>
@ -63,31 +63,31 @@
<publishTime>10/23/2017 13:15:20</publishTime>
</File>
<File Include="bin/Epost.BLL.dll">
<publishTime>12/10/2024 19:09:10</publishTime>
<publishTime>12/19/2024 15:11:22</publishTime>
</File>
<File Include="bin/Epost.BLL.pdb">
<publishTime>12/10/2024 19:09:10</publishTime>
<publishTime>12/19/2024 15:11:22</publishTime>
</File>
<File Include="bin/Epost.BLL.XmlSerializers.dll">
<publishTime>08/26/2020 18:09:48</publishTime>
</File>
<File Include="bin/Epost.DAL.dll">
<publishTime>12/10/2024 19:09:08</publishTime>
<publishTime>12/19/2024 15:11:21</publishTime>
</File>
<File Include="bin/Epost.DAL.pdb">
<publishTime>12/10/2024 19:09:08</publishTime>
<publishTime>12/19/2024 15:11:21</publishTime>
</File>
<File Include="bin/Epost.DPS.dll">
<publishTime>12/10/2024 19:09:13</publishTime>
<publishTime>12/19/2024 15:11:24</publishTime>
</File>
<File Include="bin/Epost.DPS.pdb">
<publishTime>12/10/2024 19:09:13</publishTime>
<publishTime>12/19/2024 15:11:24</publishTime>
</File>
<File Include="bin/Epost.Model.dll">
<publishTime>12/10/2024 19:09:05</publishTime>
<publishTime>12/12/2024 18:31:48</publishTime>
</File>
<File Include="bin/Epost.Model.pdb">
<publishTime>12/10/2024 19:09:05</publishTime>
<publishTime>12/12/2024 18:31:48</publishTime>
</File>
<File Include="bin/Epost.TestToolsWeb.dll">
<publishTime>09/06/2018 11:57:11</publishTime>
@ -5652,7 +5652,7 @@
<publishTime>05/30/2022 16:58:47</publishTime>
</File>
<File Include="PrecompiledApp.config">
<publishTime>12/10/2024 19:10:07</publishTime>
<publishTime>12/19/2024 15:11:26</publishTime>
</File>
<File Include="Scripts/ai.0.22.9-build00167.js">
<publishTime>04/04/2018 15:45:12</publishTime>
@ -7572,7 +7572,7 @@
<publishTime>07/04/2022 14:22:38</publishTime>
</File>
<File Include="Web.config">
<publishTime>12/10/2024 19:10:05</publishTime>
<publishTime>12/12/2024 18:31:53</publishTime>
</File>
</ItemGroup>
</Project>