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

View File

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

View File

@ -20,14 +20,12 @@ namespace Epost.DAL
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.ControlIP,
model.ControlID,
model.Address,
DateTime.Now.ToString(),
model.Type,
model.BkAddress,
model.Title,
model.Remark);
int x = db.InsertSql(sql);
if (x > 0)

View File

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

View File

@ -7,7 +7,7 @@
<PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile />
<_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 />
</PropertyGroup>
<ItemGroup>
@ -33,19 +33,19 @@
<publishTime>04/04/2018 15:45:12</publishTime>
</File>
<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 Include="bin/App_global.asax.dll">
<publishTime>06/16/2025 16:39:42</publishTime>
<publishTime>06/23/2025 18:13:15</publishTime>
</File>
<File Include="bin/BouncyCastle.Crypto.dll">
<publishTime>02/24/2020 15:29:24</publishTime>
</File>
<File Include="bin/Common.dll">
<publishTime>06/16/2025 16:29:30</publishTime>
<publishTime>06/23/2025 17:11:31</publishTime>
</File>
<File Include="bin/Common.pdb">
<publishTime>06/16/2025 16:29:30</publishTime>
<publishTime>06/23/2025 17:11:31</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>06/16/2025 16:29:31</publishTime>
<publishTime>06/23/2025 17:22:01</publishTime>
</File>
<File Include="bin/Epost.BLL.pdb">
<publishTime>06/16/2025 16:29:31</publishTime>
<publishTime>06/23/2025 17:22:01</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>06/16/2025 16:29:30</publishTime>
<publishTime>06/23/2025 17:11:31</publishTime>
</File>
<File Include="bin/Epost.DAL.pdb">
<publishTime>06/16/2025 16:29:30</publishTime>
<publishTime>06/23/2025 17:11:31</publishTime>
</File>
<File Include="bin/Epost.DPS.dll">
<publishTime>06/16/2025 16:39:25</publishTime>
<publishTime>06/23/2025 17:22:03</publishTime>
</File>
<File Include="bin/Epost.DPS.pdb">
<publishTime>06/16/2025 16:39:25</publishTime>
<publishTime>06/23/2025 17:22:03</publishTime>
</File>
<File Include="bin/Epost.Model.dll">
<publishTime>06/16/2025 16:29:29</publishTime>
<publishTime>06/23/2025 17:11:31</publishTime>
</File>
<File Include="bin/Epost.Model.pdb">
<publishTime>06/16/2025 16:29:29</publishTime>
<publishTime>06/23/2025 17:11:31</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>06/16/2025 16:39:28</publishTime>
<publishTime>06/23/2025 18:13:08</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>06/16/2025 16:39:26</publishTime>
<publishTime>06/23/2025 18:13:07</publishTime>
</File>
</ItemGroup>
</Project>