This commit is contained in:
jl
2025-06-23 18:50:32 +08:00
parent f7a87c41ff
commit 81ef9284b7
6 changed files with 117 additions and 90 deletions

View File

@ -30,61 +30,63 @@ namespace Epost.BLL
public ResultModel Initialization_T(bool isback = true) public ResultModel Initialization_T(bool isback = true)
{ {
ResultModel resultModel = new ResultModel(); ResultModel resultModel = new ResultModel();
List<LabelParamModel> list = new List<LabelParamModel>(); //List<LabelParamModel> list = new List<LabelParamModel>();
try //try
{ //{
DataTable dt = addrBLL.getControlList(); // DataTable dt = addrBLL.getControlList();
bool result = false; // bool result = false;
if (dt != null && dt.Rows.Count > 0) // if (dt != null && dt.Rows.Count > 0)
{ // {
foreach (DataRow item in dt.Rows) // foreach (DataRow item in dt.Rows)
{ // {
LabelParamModel model = new LabelParamModel(); // LabelParamModel model = new LabelParamModel();
model.ControlIP = item["ControlIP"].ToString(); // model.ControlIP = item["ControlIP"].ToString();
model.Address = "9999"; // model.Address = "9999";
model.Command = "FORMAT_JOB_DATA"; // model.Command = "FORMAT_JOB_DATA";
model.Parameter = "50"; // model.Parameter = "50";
model.Timeout = "0.5"; // model.Timeout = "0.5";
list.Add(model); // list.Add(model);
model = new LabelParamModel(); // model = new LabelParamModel();
model.ControlIP = item["ControlIP"].ToString(); // model.ControlIP = item["ControlIP"].ToString();
model.Address = "9999"; // model.Address = "9999";
model.Command = "CONNECT"; // model.Command = "CONNECT";
model.Parameter = IP; // model.Parameter = IP;
model.Timeout = "0.5"; // model.Timeout = "0.5";
list.Add(model); // list.Add(model);
model = new LabelParamModel(); // model = new LabelParamModel();
model.ControlIP = item["ControlIP"].ToString(); // model.ControlIP = item["ControlIP"].ToString();
model.Address = "9999"; // model.Address = "9999";
model.Parameter = "11111000"; // model.Parameter = "11111000";
model.Command = "UNLOCK"; // model.Command = "UNLOCK";
model.Timeout = "0.5"; // model.Timeout = "0.5";
list.Add(model); // list.Add(model);
model = new LabelParamModel(); // model = new LabelParamModel();
model.ControlIP = item["ControlIP"].ToString(); // model.ControlIP = item["ControlIP"].ToString();
model.Address = "9999"; // model.Address = "9999";
model.Command = "LED_OFF"; // model.Command = "LED_OFF";
model.Timeout = "0.5"; // model.Timeout = "0.5";
list.Add(model); // list.Add(model);
} // }
if (list.Any()) // if (list.Any())
{ // {
resultModel = SendALL_Init(list); // resultModel = SendALL_Init(list);
} // }
} // }
return resultModel; // return resultModel;
} //}
catch (Exception ex) //catch (Exception ex)
{ //{
// resultModel.result = "0";
// resultModel.msg = "初始化失败!";
// LogHelper.WriteLogInfo("初始化异常:" + ex.Message);
//}
resultModel.result = "0"; resultModel.result = "0";
resultModel.msg = "初始化失败!"; resultModel.msg = "成功";
LogHelper.WriteLogInfo("初始化异常:" + ex.Message);
}
return resultModel; return resultModel;
} }
#endregion #endregion

View File

@ -96,6 +96,19 @@ namespace Epost.BLL
logBLL.InsertErrorLog(error_model); logBLL.InsertErrorLog(error_model);
} }
public void SaveShowMesError(string Title, string Remark, string type = "999")
{
ErrorLogBLL logBLL = new ErrorLogBLL();
ErrorLogModel error_model = new ErrorLogModel();
error_model.Type = type;
error_model.Title = Title;
error_model.Remark = Remark;
logBLL.InsertErrorLog(error_model);
}
} }
} }

View File

@ -28,6 +28,7 @@ namespace Epost.BLL
WorkIngCacheDAL workbll = new WorkIngCacheDAL(); WorkIngCacheDAL workbll = new WorkIngCacheDAL();
SkuInfoBLL skuBLL = new SkuInfoBLL(); SkuInfoBLL skuBLL = new SkuInfoBLL();
UserModelCacheDAL UserCacheDAL = new UserModelCacheDAL(); UserModelCacheDAL UserCacheDAL = new UserModelCacheDAL();
ErrorLogBLL logBLL = new ErrorLogBLL();
public void ScanList() public void ScanList()
{ {
GetScanList(tblock); GetScanList(tblock);
@ -150,6 +151,10 @@ namespace Epost.BLL
umodel.Area = sarea; umodel.Area = sarea;
UserCacheDAL.UpdateUserCodeList(new List<UserCodeModel> { umodel }, EUserCommend.Create); UserCacheDAL.UpdateUserCodeList(new List<UserCodeModel> { umodel }, EUserCommend.Create);
} }
else {
logBLL.SaveShowMesError("无待拣选的波次", "无待拣选的波次");
}
} }
ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == sblock && m.Area == sarea); ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == sblock && m.Area == sarea);
if (ulist.Any()) if (ulist.Any())
@ -346,11 +351,13 @@ namespace Epost.BLL
{ {
//无待启动的商品 //无待启动的商品
LogHelper.WriteLogInfo("无待启动的商品,请先扫描商品"+scanStr,LogHelper.Log_Type.ERROR); LogHelper.WriteLogInfo("无待启动的商品,请先扫描商品"+scanStr,LogHelper.Log_Type.ERROR);
logBLL.SaveShowMesError("无待启动的商品,请先扫描商品", "无待启动的商品,请先扫描商品");
} }
} }
else { else {
//无此工号 //无此工号
LogHelper.WriteLogInfo("扫描工号不存在"+scanStr, LogHelper.Log_Type.ERROR); LogHelper.WriteLogInfo("扫描工号不存在"+scanStr, LogHelper.Log_Type.ERROR);
logBLL.SaveShowMesError("扫描工号不存在" , "扫描工号不存在" + scanStr);
} }
@ -453,6 +460,8 @@ namespace Epost.BLL
else else
{ {
LogHelper.WriteLogInfo("未扫描波次信息", LogHelper.Log_Type.ERROR); LogHelper.WriteLogInfo("未扫描波次信息", LogHelper.Log_Type.ERROR);
logBLL.SaveShowMesError("无波次信息!", "无波次信息");
} }
} }
@ -484,6 +493,7 @@ namespace Epost.BLL
else else
{ {
LogHelper.WriteLogInfo("未扫描波次信息", LogHelper.Log_Type.ERROR); LogHelper.WriteLogInfo("未扫描波次信息", LogHelper.Log_Type.ERROR);
logBLL.SaveShowMesError("无波次信息!", "无波次信息");
} }
} }
@ -491,15 +501,17 @@ namespace Epost.BLL
{ {
//提示无任务 //提示无任务
ShowMessageModel_M show = new ShowMessageModel_M(); //ShowMessageModel_M show = new ShowMessageModel_M();
show.Title = "商品:" + scanStr + "无任务!"; //show.Title = "商品:" + scanStr + "无任务!";
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red); //show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Red);
show.Block = data.Block; //show.Block = data.Block;
show.Area = data.Area; //show.Area = data.Area;
show.Type = 8; //show.Type = 8;
show.Islock = false; //show.Islock = false;
comBLL.ShowBoxMessage_M(show); //comBLL.ShowBoxMessage_M(show);
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute); //downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
logBLL.SaveShowMesError("商品:" + scanStr + "无任务!", "商品:" + scanStr + "无任务!");
} }
#endregion #endregion

View File

@ -20,14 +20,12 @@ namespace Epost.DAL
try try
{ {
string sql = string.Format("insert into errorlog(username,ControlIP,ControlID,Address,ErrorDate,Type,BkAddress,Remark) values('{0}','{1}','{2}','{3}','{4}',{5},'{6}','{7}')", string sql = string.Format("insert into errorlog(username,ErrorDate,Type,title,Remark) values('{0}','{1}','{2}','{3}','{4}')",
model.UserName, model.UserName,
model.ControlIP,
model.ControlID,
model.Address,
DateTime.Now.ToString(), DateTime.Now.ToString(),
model.Type, model.Type,
model.BkAddress, model.Title,
model.Remark); model.Remark);
int x = db.InsertSql(sql); int x = db.InsertSql(sql);
if (x > 0) if (x > 0)

View File

@ -20,7 +20,7 @@ namespace Epost.Model
private string _UserName = string.Empty; private string _UserName = string.Empty;
public int _PageIndex = 0; public int _PageIndex = 0;
public int _PageSize = 0; public int _PageSize = 0;
private string _Title = string.Empty;
public int PageIndex public int PageIndex
{ {
get get
@ -172,5 +172,7 @@ namespace Epost.Model
_ID = value; _ID = value;
} }
} }
public string Title { get => _Title; set => _Title = value; }
} }
} }

View File

@ -7,7 +7,7 @@
<PropertyGroup> <PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile /> <TimeStampOfAssociatedLegacyPublishXmlFile />
<_PublishTargetUrl>D:\驿传\GuangzhouHuiFeng_DAS</_PublishTargetUrl> <_PublishTargetUrl>D:\驿传\GuangzhouHuiFeng_DAS</_PublishTargetUrl>
<History>True|2025-06-16T08:39:46.1896351Z||;True|2025-06-04T15:01:49.8008687+08:00||;True|2025-01-16T15:37:40.8814043+08:00||;True|2024-12-19T15:11:44.2536385+08:00||;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> <History>True|2025-06-23T10:49:19.8150434Z||;False|2025-06-23T18:47:53.8200239+08:00||;True|2025-06-23T18:13:17.9954519+08:00||;True|2025-06-16T16:39:46.1896351+08:00||;True|2025-06-04T15:01:49.8008687+08:00||;True|2025-01-16T15:37:40.8814043+08:00||;True|2024-12-19T15:11:44.2536385+08:00||;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 /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -33,19 +33,19 @@
<publishTime>04/04/2018 15:45:12</publishTime> <publishTime>04/04/2018 15:45:12</publishTime>
</File> </File>
<File Include="bin/App_global.asax.compiled"> <File Include="bin/App_global.asax.compiled">
<publishTime>06/16/2025 16:39:42</publishTime> <publishTime>06/23/2025 18:13:15</publishTime>
</File> </File>
<File Include="bin/App_global.asax.dll"> <File Include="bin/App_global.asax.dll">
<publishTime>06/16/2025 16:39:42</publishTime> <publishTime>06/23/2025 18:13:15</publishTime>
</File> </File>
<File Include="bin/BouncyCastle.Crypto.dll"> <File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>02/24/2020 15:29:24</publishTime> <publishTime>02/24/2020 15:29:24</publishTime>
</File> </File>
<File Include="bin/Common.dll"> <File Include="bin/Common.dll">
<publishTime>06/16/2025 16:29:30</publishTime> <publishTime>06/23/2025 17:11:31</publishTime>
</File> </File>
<File Include="bin/Common.pdb"> <File Include="bin/Common.pdb">
<publishTime>06/16/2025 16:29:30</publishTime> <publishTime>06/23/2025 17:11:31</publishTime>
</File> </File>
<File Include="bin/ComposerSDK.dll"> <File Include="bin/ComposerSDK.dll">
<publishTime>04/29/2020 16:50:14</publishTime> <publishTime>04/29/2020 16:50:14</publishTime>
@ -63,31 +63,31 @@
<publishTime>10/23/2017 13:15:20</publishTime> <publishTime>10/23/2017 13:15:20</publishTime>
</File> </File>
<File Include="bin/Epost.BLL.dll"> <File Include="bin/Epost.BLL.dll">
<publishTime>06/16/2025 16:29:31</publishTime> <publishTime>06/23/2025 17:22:01</publishTime>
</File> </File>
<File Include="bin/Epost.BLL.pdb"> <File Include="bin/Epost.BLL.pdb">
<publishTime>06/16/2025 16:29:31</publishTime> <publishTime>06/23/2025 17:22:01</publishTime>
</File> </File>
<File Include="bin/Epost.BLL.XmlSerializers.dll"> <File Include="bin/Epost.BLL.XmlSerializers.dll">
<publishTime>08/26/2020 18:09:48</publishTime> <publishTime>08/26/2020 18:09:48</publishTime>
</File> </File>
<File Include="bin/Epost.DAL.dll"> <File Include="bin/Epost.DAL.dll">
<publishTime>06/16/2025 16:29:30</publishTime> <publishTime>06/23/2025 17:11:31</publishTime>
</File> </File>
<File Include="bin/Epost.DAL.pdb"> <File Include="bin/Epost.DAL.pdb">
<publishTime>06/16/2025 16:29:30</publishTime> <publishTime>06/23/2025 17:11:31</publishTime>
</File> </File>
<File Include="bin/Epost.DPS.dll"> <File Include="bin/Epost.DPS.dll">
<publishTime>06/16/2025 16:39:25</publishTime> <publishTime>06/23/2025 17:22:03</publishTime>
</File> </File>
<File Include="bin/Epost.DPS.pdb"> <File Include="bin/Epost.DPS.pdb">
<publishTime>06/16/2025 16:39:25</publishTime> <publishTime>06/23/2025 17:22:03</publishTime>
</File> </File>
<File Include="bin/Epost.Model.dll"> <File Include="bin/Epost.Model.dll">
<publishTime>06/16/2025 16:29:29</publishTime> <publishTime>06/23/2025 17:11:31</publishTime>
</File> </File>
<File Include="bin/Epost.Model.pdb"> <File Include="bin/Epost.Model.pdb">
<publishTime>06/16/2025 16:29:29</publishTime> <publishTime>06/23/2025 17:11:31</publishTime>
</File> </File>
<File Include="bin/Epost.TestToolsWeb.dll"> <File Include="bin/Epost.TestToolsWeb.dll">
<publishTime>09/06/2018 11:57:11</publishTime> <publishTime>09/06/2018 11:57:11</publishTime>
@ -5652,7 +5652,7 @@
<publishTime>05/30/2022 16:58:47</publishTime> <publishTime>05/30/2022 16:58:47</publishTime>
</File> </File>
<File Include="PrecompiledApp.config"> <File Include="PrecompiledApp.config">
<publishTime>06/16/2025 16:39:28</publishTime> <publishTime>06/23/2025 18:13:08</publishTime>
</File> </File>
<File Include="Scripts/ai.0.22.9-build00167.js"> <File Include="Scripts/ai.0.22.9-build00167.js">
<publishTime>04/04/2018 15:45:12</publishTime> <publishTime>04/04/2018 15:45:12</publishTime>
@ -7572,7 +7572,7 @@
<publishTime>07/04/2022 14:22:38</publishTime> <publishTime>07/04/2022 14:22:38</publishTime>
</File> </File>
<File Include="Web.config"> <File Include="Web.config">
<publishTime>06/16/2025 16:39:26</publishTime> <publishTime>06/23/2025 18:13:07</publishTime>
</File> </File>
</ItemGroup> </ItemGroup>
</Project> </Project>