Compare commits
10 Commits
taitan_den
...
SanYing_DA
Author | SHA1 | Date | |
---|---|---|---|
aee2063646 | |||
53c4b66485 | |||
3648692781 | |||
e2c1d127a0 | |||
7e11ca5d4d | |||
70ebea6292 | |||
efe0835c4e | |||
c4fe9e1a9b | |||
c53719f69b | |||
2436a3805b |
Binary file not shown.
Binary file not shown.
@ -374,25 +374,5 @@ namespace Epost.BLL
|
|||||||
return dal.GetAddressListByByPage(strWhere, orderby, startIndex, endIndex, out recordCount);
|
return dal.GetAddressListByByPage(strWhere, orderby, startIndex, endIndex, out recordCount);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 灯带
|
|
||||||
|
|
||||||
#region 查询设备信息
|
|
||||||
public DataTable QueryAddrList(string strwhere)
|
|
||||||
{
|
|
||||||
return dal.QueryAddrList(strwhere);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
#region 查询设备信息
|
|
||||||
public DataTable QueryControlList(string strwhere)
|
|
||||||
{
|
|
||||||
return dal.QueryControlList(strwhere);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -154,9 +154,9 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 获取参数中文
|
#region 获取参数中文
|
||||||
public string GETDISPLAYJOBPAR_CN(string no,string Lightcolor,string IsTwinkle,string Title,string BigQuantity, string BigUnit,string Quantity, string Unit,string Content,string Rfcode)
|
public string GETDISPLAYJOBPAR_CN(string no, string Lightcolor, string IsTwinkle, string Title, string BigQuantity, string BigUnit, string Quantity, string Unit, string Content, string Rfcode)
|
||||||
{
|
{
|
||||||
string parar = no+"00" + Lightcolor + IsTwinkle+"30CQ" + Title + "\n\n" + BigQuantity + "\n" + BigUnit + "\n" + Quantity + "\n" + Unit + "\n" + Content + "\n00\n\n" + Rfcode + "\n"; ;
|
string parar = no + "00" + Lightcolor + IsTwinkle + "30CQ" + Title + "\n\n" + BigQuantity + "\n" + BigUnit + "\n" + Quantity + "\n" + Unit + "\n" + Content + "\n00\n\n" + Rfcode + "\n"; ;
|
||||||
return parar;
|
return parar;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -246,7 +246,7 @@ namespace Epost.BLL
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 任务指令(传参地址)
|
#region 任务指令(传参地址)
|
||||||
public void DISPLAY_JOB_M(LabelParamModel model, bool clear = false, bool islock = false )
|
public void DISPLAY_JOB_M(LabelParamModel model, bool clear = false, bool islock = false)
|
||||||
{
|
{
|
||||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||||
if (clear)
|
if (clear)
|
||||||
@ -259,14 +259,14 @@ namespace Epost.BLL
|
|||||||
clearModel.Command = "REMOVE_JOB";
|
clearModel.Command = "REMOVE_JOB";
|
||||||
clearModel.Timeout = "0.5";
|
clearModel.Timeout = "0.5";
|
||||||
clearModel.Type = model.Type;
|
clearModel.Type = model.Type;
|
||||||
// dal.REMOVE_JOB(clearModel);
|
// dal.REMOVE_JOB(clearModel);
|
||||||
list.Add(clearModel);
|
list.Add(clearModel);
|
||||||
}
|
}
|
||||||
LabelParamModel DisplayModel = new LabelParamModel();
|
LabelParamModel DisplayModel = new LabelParamModel();
|
||||||
DisplayModel.Address = model.Address;
|
DisplayModel.Address = model.Address;
|
||||||
DisplayModel.ControlIP = model.ControlIP;
|
DisplayModel.ControlIP = model.ControlIP;
|
||||||
DisplayModel.Content =model.Content;
|
DisplayModel.Content = model.Content;
|
||||||
DisplayModel.Title =model.Title;
|
DisplayModel.Title = model.Title;
|
||||||
DisplayModel.Loc = model.Loc;
|
DisplayModel.Loc = model.Loc;
|
||||||
DisplayModel.Quantity = model.Quantity;
|
DisplayModel.Quantity = model.Quantity;
|
||||||
DisplayModel.Uid = model.Uid;
|
DisplayModel.Uid = model.Uid;
|
||||||
@ -553,7 +553,7 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
// DataTable dt = addrBLL.getAddresslist(block,area,type);
|
// DataTable dt = addrBLL.getAddresslist(block,area,type);
|
||||||
|
|
||||||
if(offList.Any())
|
if (offList.Any())
|
||||||
{
|
{
|
||||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
List<LabelParamModel> list = new List<LabelParamModel>();
|
||||||
foreach (JobModel item in offList)
|
foreach (JobModel item in offList)
|
||||||
@ -615,8 +615,8 @@ namespace Epost.BLL
|
|||||||
#region 点亮显示标签
|
#region 点亮显示标签
|
||||||
public void ShowBoxMessage_M(ShowMessageModel_M show)
|
public void ShowBoxMessage_M(ShowMessageModel_M show)
|
||||||
{
|
{
|
||||||
//获取作业区对应的显示标签地址
|
//获取作业区对应的显示标签地址
|
||||||
DataTable showaddrDT = addrBLL.GetBoxAddress(show.Block,show.Area,show.Type);
|
DataTable showaddrDT = addrBLL.GetBoxAddress(show.Block, show.Area, show.Type);
|
||||||
if (showaddrDT != null && showaddrDT.Rows.Count > 0)
|
if (showaddrDT != null && showaddrDT.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
foreach (DataRow addritem in showaddrDT.Rows)
|
foreach (DataRow addritem in showaddrDT.Rows)
|
||||||
@ -626,9 +626,9 @@ namespace Epost.BLL
|
|||||||
lablemodel.Address = addritem["address"].ToString();
|
lablemodel.Address = addritem["address"].ToString();
|
||||||
lablemodel.ControlIP = addritem["controlip"].ToString();
|
lablemodel.ControlIP = addritem["controlip"].ToString();
|
||||||
lablemodel.Command = "DISPLAY_JOB";
|
lablemodel.Command = "DISPLAY_JOB";
|
||||||
lablemodel.Uid =show.Uid;
|
lablemodel.Uid = show.Uid;
|
||||||
if (string.IsNullOrEmpty(show.Uid))
|
if (string.IsNullOrEmpty(show.Uid))
|
||||||
{ lablemodel.Uid = addritem["address"].ToString(); }
|
{ lablemodel.Uid = show.No + addritem["address"].ToString(); }
|
||||||
|
|
||||||
lablemodel.Mode = show.Color + "0";
|
lablemodel.Mode = show.Color + "0";
|
||||||
if (addritem["addresstype"].ToString() == "2")
|
if (addritem["addresstype"].ToString() == "2")
|
||||||
@ -691,7 +691,7 @@ namespace Epost.BLL
|
|||||||
model.Type = "T";
|
model.Type = "T";
|
||||||
model.Address = item["address"].ToString();
|
model.Address = item["address"].ToString();
|
||||||
model.ControlIP = item["ControlIP"].ToString();
|
model.ControlIP = item["ControlIP"].ToString();
|
||||||
model.Parameter = ConvertHexHelper.ConvertString(item["addresstype"].ToString(), 10, 16).ToString().PadLeft(2,'0')+ isoff;
|
model.Parameter = ConvertHexHelper.ConvertString(item["addresstype"].ToString(), 10, 16).ToString().PadLeft(2, '0') + isoff;
|
||||||
list.Add(model);
|
list.Add(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -715,11 +715,11 @@ namespace Epost.BLL
|
|||||||
LabelParamModel model = new LabelParamModel();
|
LabelParamModel model = new LabelParamModel();
|
||||||
model.Address = addritem["address"].ToString();
|
model.Address = addritem["address"].ToString();
|
||||||
model.ControlIP = addritem["controlip"].ToString();
|
model.ControlIP = addritem["controlip"].ToString();
|
||||||
model.Parameter =show.No;
|
model.Parameter = show.No;
|
||||||
model.Command = "REMOVE_JOB";
|
model.Command = "REMOVE_JOB";
|
||||||
model.Timeout = "0.5";
|
model.Timeout = "0.5";
|
||||||
list.Add(model);
|
list.Add(model);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (list != null && list.Count > 0)
|
if (list != null && list.Count > 0)
|
||||||
{
|
{
|
||||||
@ -728,7 +728,7 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -739,12 +739,12 @@ namespace Epost.BLL
|
|||||||
List<JobModel> list = new List<JobModel>();
|
List<JobModel> list = new List<JobModel>();
|
||||||
DataTable OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
DataTable OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
||||||
bool isecho = false;
|
bool isecho = false;
|
||||||
if (OrderDt == null || OrderDt.Rows.Count == 0)//回显
|
//if (OrderDt == null || OrderDt.Rows.Count == 0)//回显
|
||||||
{
|
//{
|
||||||
OrderDt = dal.GetOrderList_echo(matchid, sku, area, block);
|
// OrderDt = dal.GetOrderList_Car(matchid, sku, area, block);
|
||||||
isecho = true;
|
// isecho = true;
|
||||||
|
|
||||||
}
|
//}
|
||||||
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
string usercode = string.Empty;
|
string usercode = string.Empty;
|
||||||
@ -767,21 +767,14 @@ namespace Epost.BLL
|
|||||||
demodel.BatchId = item["BatchId"].ToString();
|
demodel.BatchId = item["BatchId"].ToString();
|
||||||
demodel.ID = item["ID"].ToString();
|
demodel.ID = item["ID"].ToString();
|
||||||
demodel.GoodsName = item["GoodsName"].ToString();
|
demodel.GoodsName = item["GoodsName"].ToString();
|
||||||
demodel.GoodsType = item["GoodsType"].ToString();
|
|
||||||
demodel.Quantity = Convert.ToInt32(item["Quantity"].ToString());
|
demodel.Quantity = Convert.ToInt32(item["Quantity"].ToString());
|
||||||
demodel.CheckQuantity = Convert.ToInt32(item["CheckQuantity"].ToString());
|
|
||||||
demodel.Sku = item["Sku"].ToString();
|
demodel.Sku = item["Sku"].ToString();
|
||||||
demodel.Tolocation = item["Tolocation"].ToString();
|
demodel.Tolocation = item["Tolocation"].ToString();
|
||||||
demodel.Matchid = item["Matchid"].ToString();
|
demodel.Matchid = item["Matchid"].ToString();
|
||||||
demodel.ShopID = item["shopid"].ToString();
|
demodel.ShopID = item["shopid"].ToString();
|
||||||
demodel.BoxCode = item["boxcode"].ToString();
|
|
||||||
demodel.LotNo = item["LotNo"].ToString();
|
|
||||||
demodel.Discount = item["Discount"].ToString();
|
demodel.Discount = item["Discount"].ToString();
|
||||||
demodel.ProdArea = item["ProdArea"].ToString();
|
|
||||||
demodel.ColorCode = item["corlorcode"].ToString();
|
|
||||||
demodel.WholeUnit = item["WholeUnit"].ToString();
|
|
||||||
demodel.Unit = item["Unit"].ToString();
|
demodel.Unit = item["Unit"].ToString();
|
||||||
demodel.TrayCode = item["bkbarcode"].ToString();
|
//demodel.TrayCode = item["bkbarcode"].ToString();
|
||||||
#region 获取库位信息
|
#region 获取库位信息
|
||||||
demodel.Block = item["Block"].ToString();
|
demodel.Block = item["Block"].ToString();
|
||||||
demodel.Area = item["Area"].ToString();
|
demodel.Area = item["Area"].ToString();
|
||||||
@ -802,11 +795,11 @@ namespace Epost.BLL
|
|||||||
demodel.TaskArea = Convert.ToInt32(item["area"].ToString());
|
demodel.TaskArea = Convert.ToInt32(item["area"].ToString());
|
||||||
demodel.TaskBlock = Convert.ToInt32(item["block"].ToString());
|
demodel.TaskBlock = Convert.ToInt32(item["block"].ToString());
|
||||||
demodel.No = "01";
|
demodel.No = "01";
|
||||||
if (isecho)
|
//if (isecho)
|
||||||
{
|
//{
|
||||||
demodel.No = "04";
|
// demodel.No = "04";
|
||||||
demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
// demodel.ColorCode = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||||
}
|
//}
|
||||||
list.Add(demodel);
|
list.Add(demodel);
|
||||||
if (!isecho) {
|
if (!isecho) {
|
||||||
//修改数据为已读
|
//修改数据为已读
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
|
using System.Data.Entity.Infrastructure;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Epost.Common;
|
using Epost.Common;
|
||||||
|
using Epost.DAL;
|
||||||
using Epost.DAL.Cache;
|
using Epost.DAL.Cache;
|
||||||
using Epost.DAL.Enum;
|
using Epost.DAL.Enum;
|
||||||
using Epost.Model;
|
using Epost.Model;
|
||||||
@ -13,8 +15,9 @@ using Epost.Model;
|
|||||||
namespace Epost.BLL
|
namespace Epost.BLL
|
||||||
{
|
{
|
||||||
|
|
||||||
public class OrderControlBLL
|
public class OrderControlBLL
|
||||||
{
|
{
|
||||||
|
OrdersDAL dal = new OrdersDAL();
|
||||||
OrderBLL orderbll = new OrderBLL();
|
OrderBLL orderbll = new OrderBLL();
|
||||||
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
OrdersQueueBLL queueBLL = new OrdersQueueBLL();
|
||||||
CommandBLL comBLL = new CommandBLL();
|
CommandBLL comBLL = new CommandBLL();
|
||||||
@ -41,25 +44,21 @@ namespace Epost.BLL
|
|||||||
public ResultModel ClearALL()
|
public ResultModel ClearALL()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
bool t = addrBLL.UpdateState();
|
bool t = addrBLL.UpdateState();
|
||||||
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@!----V20220705-1---");
|
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@!----V20230418-1---");
|
||||||
JobCache.ClearJobList();
|
JobCache.ClearJobList();
|
||||||
downCacheDAL.ClearJobDownList();
|
downCacheDAL.ClearJobDownList();
|
||||||
locCache.ClearScanList();
|
locCache.ClearScanList();
|
||||||
queueBLL.UpdateQueueState();
|
queueBLL.UpdateQueueState();
|
||||||
// queueboxBLL.UpdateQueueState();
|
//queueboxBLL.UpdateQueueState();
|
||||||
orderbll.UpOrderstate();
|
orderbll.UpOrderstate();
|
||||||
UserCacheDAL.ClearUserCodeList();
|
UserCacheDAL.ClearUserCodeList();
|
||||||
boxcache.ClearBoxList();
|
boxcache.ClearBoxList();
|
||||||
ResultModel resultModel = comBLL.Initialization_M();
|
ResultModel resultModel = comBLL.Initialization_M();
|
||||||
GetOrderQueue(); //加载任务显示器信息
|
//GetOrderQueue(); //加载任务显示器信息
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
LogHelper.WriteLogInfo("初始化@@@@@@@@@@@@!----V20200727-1---");
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -340,38 +339,56 @@ namespace Epost.BLL
|
|||||||
skulist = queueDT.Rows[0]["sku"].ToString();
|
skulist = queueDT.Rows[0]["sku"].ToString();
|
||||||
LogHelper.WriteLogInfo("=======" + qmodel.UserCode + "=====" + area + "区===sku=" + skulist);
|
LogHelper.WriteLogInfo("=======" + qmodel.UserCode + "=====" + area + "区===sku=" + skulist);
|
||||||
}
|
}
|
||||||
|
#region 任意回显标签拍下 熄灭回显设备
|
||||||
|
//if (data.Loc == "check")//任意回显标签拍下 熄灭回显设备
|
||||||
|
//{
|
||||||
|
// List<JobModel> rejob = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 1 && m.Sku == queueDT.Rows[0]["sku"].ToString());
|
||||||
|
// if (rejob.Any())
|
||||||
|
// {
|
||||||
|
// JobModel model = rejob.FirstOrDefault();
|
||||||
|
// comBLL.ClearArea_M(rejob);
|
||||||
|
// //熄灭通道灯
|
||||||
|
// comBLL.DISPLAY_LIGHT_BLOCK(block, area, "0");
|
||||||
|
// // comBLL.UNLOCK_M(rejob);
|
||||||
|
// #region 修改任务队列状态
|
||||||
|
// OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||||
|
// qumodel.State = 3;
|
||||||
|
// qumodel.Taskblock = block;
|
||||||
|
// qumodel.Taskarea = area;
|
||||||
|
// qumodel.Sku = model.Sku;
|
||||||
|
// qumodel.Matchid = model.Matchid;
|
||||||
|
// qumodel.UserCode = model.UserCode;
|
||||||
|
// queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||||
|
|
||||||
if (data.Loc == "check")//任意回显标签拍下 熄灭回显设备
|
// #endregion
|
||||||
{
|
// }
|
||||||
List<JobModel> rejob = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 1 && m.Sku == queueDT.Rows[0]["sku"].ToString());
|
// #region 清除当前区已做完的sku
|
||||||
if (rejob.Any())
|
// JobCache.UpdateJobModelList(rejob, EcommendType.Execute);
|
||||||
{
|
// #endregion
|
||||||
JobModel model = rejob.FirstOrDefault();
|
//}
|
||||||
comBLL.ClearArea_M(rejob);
|
#endregion
|
||||||
//熄灭通道灯
|
if (data.Result == "4")//■按键拍下
|
||||||
comBLL.DISPLAY_LIGHT_BLOCK(block, area, "0");
|
|
||||||
// comBLL.UNLOCK_M(rejob);
|
|
||||||
#region 修改任务队列状态
|
|
||||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
|
||||||
qumodel.State = 3;
|
|
||||||
qumodel.Taskblock = block;
|
|
||||||
qumodel.Taskarea = area;
|
|
||||||
qumodel.Sku = model.Sku;
|
|
||||||
qumodel.Matchid = model.Matchid;
|
|
||||||
qumodel.UserCode = model.UserCode;
|
|
||||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
#region 清除当前区已做完的sku
|
|
||||||
JobCache.UpdateJobModelList(rejob, EcommendType.Execute);
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
else if (data.Result == "4")//■按键拍下
|
|
||||||
{
|
{
|
||||||
data.Parameter = "0";
|
data.Parameter = "0";
|
||||||
jobdown_start(data, job, block, area, jobList);
|
jobdown_start(data, job, block, area, jobList);
|
||||||
}
|
}
|
||||||
|
else if (type == "8")//波次完成拍下
|
||||||
|
{
|
||||||
|
List<UserCodeModel> ulist = UserCacheDAL.GetUserCodeList().FindAll(m => m.Block == data.Block);
|
||||||
|
if (ulist.Any())
|
||||||
|
{
|
||||||
|
UserCodeModel umodel = ulist.FirstOrDefault();
|
||||||
|
bool allfinish = dal.IsFinishWorkByCar(1, umodel.Matchid, data.Block);
|
||||||
|
if (allfinish)
|
||||||
|
{
|
||||||
|
//判断整个波次是否已完成
|
||||||
|
dal.UpdateStateByCar(umodel.Matchid);
|
||||||
|
List<JobModel> rejob = job.FindAll(m => m.Block == data.Block && m.State == 3);
|
||||||
|
if (rejob.Any()) { JobCache.UpdateJobModelList(rejob, EcommendType.Execute); }
|
||||||
|
UserCacheDAL.UpdateUserCodeList(ulist, EUserCommend.Execute);//删除波次信息
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("JOB_DOWN开始~~~~~~~~~~~~~~~~");
|
LogHelper.WriteLogInfo("JOB_DOWN开始~~~~~~~~~~~~~~~~");
|
||||||
@ -381,6 +398,8 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
|
List<JobModel> rjob = job.FindAll(m => m.Block == data.Block && m.State == 3);
|
||||||
|
JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -388,6 +407,8 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
public void jobdown_start(ResultMessageModel data, List<JobModel> job, string block, string area, List<JobModel> jobList)
|
public void jobdown_start(ResultMessageModel data, List<JobModel> job, string block, string area, List<JobModel> jobList)
|
||||||
{
|
{
|
||||||
|
var content = string.Empty;
|
||||||
|
var color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
int truequantity = 0;
|
int truequantity = 0;
|
||||||
int checkquantity = 0;
|
int checkquantity = 0;
|
||||||
string scanstr = data.Parameter;
|
string scanstr = data.Parameter;
|
||||||
@ -395,44 +416,31 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
truequantity = Convert.ToInt32(scanstr);
|
truequantity = Convert.ToInt32(scanstr);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (job.Any())
|
if (job.Any())
|
||||||
{
|
{
|
||||||
List<JobModel> downlist = new List<JobModel>();
|
List<JobModel> downlist = new List<JobModel>();
|
||||||
JobModel model = job.FirstOrDefault();
|
JobModel model = job.FirstOrDefault();
|
||||||
|
|
||||||
//List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation);
|
|
||||||
//if (manyList.Any())//合并显示数据
|
|
||||||
//{
|
|
||||||
|
|
||||||
// downlist.AddRange(manyList);
|
|
||||||
// LogHelper.WriteLogInfo("合并显示数据=========="+ manyList .Count+ "==================");
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
downlist.Add(model);
|
downlist.Add(model);
|
||||||
// }
|
int endcount = 1;
|
||||||
//修改订单状态
|
List<JobModel> manyList = job.FindAll(m => m.ManyState == 1 && m.Tolocation == model.Tolocation && m.Sku == model.Sku);
|
||||||
|
if (manyList.Any())//合并显示数据
|
||||||
|
{
|
||||||
|
endcount = manyList.Count;
|
||||||
|
downlist.AddRange(manyList);
|
||||||
|
LogHelper.WriteLogInfo("合并显示数据" + endcount + "============================");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
downlist.Add(model);
|
||||||
|
}
|
||||||
|
|
||||||
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
orderbll.UpdateOrderState_Car(downlist, model, truequantity, checkquantity);
|
||||||
LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
LogHelper.WriteLogInfo("6------" + data.Address + "------" + model.Sku + "----" + model.State + "");
|
||||||
bool skuInish = orderbll.IsFinishWork(1, block, "", area, model.Sku);
|
bool skuInish = dal.IsFinishWork(1, block, "", area, model.Sku, "", model.Matchid);
|
||||||
model.State = 3;
|
|
||||||
if (skuInish)
|
if (skuInish)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("区SKU拣选完成--------------");
|
LogHelper.WriteLogInfo(data.Address + "=========------------------" + data.Parameter);
|
||||||
//删除sku缓存信息
|
|
||||||
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(p => p.Parameter == model.Sku && p.Command == "QUERY_SPECIAL_STATUS" && p.Area == area);
|
|
||||||
downCacheDAL.UpdateJobDownModelList(scanlist, EdownCommend.Execute);
|
|
||||||
//熄灭通道灯
|
|
||||||
comBLL.DISPLAY_LIGHT_BLOCK(block, area, "0");
|
|
||||||
|
|
||||||
#region 熄灭当前区显示屏
|
|
||||||
List<JobModel> offList = jobList.FindAll(m => m.Block == block && m.Area == area && m.State == 3 && m.Sku == model.Sku);
|
|
||||||
if (offList.Any())
|
|
||||||
{
|
|
||||||
comBLL.LED_OFF_CLEAR(offList);
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 修改任务队列状态
|
#region 修改任务队列状态
|
||||||
OrdersQueueModel qumodel = new OrdersQueueModel();
|
OrdersQueueModel qumodel = new OrdersQueueModel();
|
||||||
qumodel.State = 3;
|
qumodel.State = 3;
|
||||||
@ -440,58 +448,44 @@ namespace Epost.BLL
|
|||||||
qumodel.Taskarea = area;
|
qumodel.Taskarea = area;
|
||||||
qumodel.Sku = model.Sku;
|
qumodel.Sku = model.Sku;
|
||||||
qumodel.Matchid = model.Matchid;
|
qumodel.Matchid = model.Matchid;
|
||||||
qumodel.UserCode = model.UserCode;
|
|
||||||
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
queueBLL.UpdateQueueTaskArea_Car(qumodel);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 刷新波次信息
|
|
||||||
showSummaryMes(model.Sku, block, area, Convert.ToInt32(block), null, model.Tolocation, model.Matchid);
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
Thread.Sleep(30);
|
Thread.Sleep(30);
|
||||||
#region 整条通道当前用户所有任务分播结束
|
LogHelper.WriteLogInfo("区SKU拣选完成--------------");
|
||||||
bool blockfinish = orderbll.IsFinishWorkByCar(1, model.Matchid, block);
|
//删除sku缓存信息
|
||||||
if (blockfinish)
|
List<ResultMessageModel> scanlist = downCacheDAL.GetPlanJobDownList().FindAll(p => p.Parameter == model.Sku && p.Command == "QUERY_SCAN_STATUS" && p.Area == area);
|
||||||
|
downCacheDAL.UpdateJobDownModelList(scanlist, EdownCommend.Execute);
|
||||||
|
List<JobModel> rjob = jobList.FindAll(m => m.Block == data.Block && m.Sku == model.Sku);
|
||||||
|
JobCache.UpdateJobModelList(rjob, EcommendType.Execute);
|
||||||
|
|
||||||
|
bool allfinish = dal.IsFinishWork_box("", 0, model.Matchid);
|
||||||
|
if (allfinish)
|
||||||
{
|
{
|
||||||
#region 点亮显示器
|
//修改订单状态
|
||||||
ShowMessageModel_M show = new ShowMessageModel_M();
|
orderbll.UpdateOrderState_Car(downlist, model, 1, checkquantity);
|
||||||
show.Title = "当前波次分播完成";
|
bool lbo = dal.UpdateLocation(block, area);
|
||||||
show.Contents = "拍下熄灭所有设备\r请扫描继续作业";
|
dal.UpdateStateByCar(model.Matchid);
|
||||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
content = "此运单号作业已完成\r\r";
|
||||||
show.Qty = "0";
|
|
||||||
show.Type = 8;
|
|
||||||
show.Block = block;
|
|
||||||
show.Islock = false;
|
|
||||||
show.IsTwinkle = 1;
|
|
||||||
show.No = "01";
|
|
||||||
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);
|
|
||||||
|
|
||||||
|
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
||||||
|
showmodel.Area = area;
|
||||||
|
showmodel.Block = block;
|
||||||
|
showmodel.Color = color;
|
||||||
|
showmodel.Islock = true;
|
||||||
|
showmodel.Title = model.Matchid;
|
||||||
|
showmodel.No = "01";
|
||||||
|
showmodel.IsTwinkle = 0;
|
||||||
|
showmodel.Contents = content;
|
||||||
|
showmodel.Type = 2;
|
||||||
|
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 区内sku播完回传
|
|
||||||
// orderbll.UpdateStateByCar(model.Matchid, "", model.Sku);
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 清除当前区已做完的sku
|
|
||||||
JobCache.UpdateJobModelList(offList, EcommendType.Execute);
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//删除已完成的拣选缓存信息
|
||||||
|
List<JobModel> finjob = JobCache.GetPlanJobList().FindAll(m => m.Block == data.Block && m.Area == data.Area && m.State == 3);
|
||||||
|
JobCache.UpdateJobModelList(finjob, EcommendType.Execute);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
@ -561,66 +555,50 @@ namespace Epost.BLL
|
|||||||
#region 点亮任务标签
|
#region 点亮任务标签
|
||||||
foreach (JobModel item in nowJoblist.ToArray())
|
foreach (JobModel item in nowJoblist.ToArray())
|
||||||
{
|
{
|
||||||
|
if (item.State == 0)
|
||||||
#region 回显设备锁定
|
|
||||||
if (queueDT.Rows[0]["lightcolor"].ToString() == EnumHelper.EMToDescriptionString(LightColor.Color.Blue))
|
|
||||||
{
|
{
|
||||||
|
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
|
||||||
|
int quantity = item.Quantity;
|
||||||
|
|
||||||
LabelParamModel locklamodel = new LabelParamModel();
|
#region 判断同一订单、同一货位多条数据 合并显示
|
||||||
locklamodel.Address = item.Address.ToString();
|
if (manyJoblist.Count > 1)//同一个货位的数据合并显示
|
||||||
locklamodel.ControlIP = item.ControlIP.ToString();
|
{
|
||||||
locklamodel.Command = "LOCK";
|
quantity = 0;
|
||||||
locklamodel.Parameter = "11111000";
|
if (manyJoblist.FindAll(m => m.State == 0).Any())
|
||||||
locklamodel.Type = "N";
|
{
|
||||||
list.Add(locklamodel);
|
foreach (JobModel mitem in manyJoblist)
|
||||||
|
{
|
||||||
|
quantity += mitem.Quantity;
|
||||||
|
mitem.State = 1;
|
||||||
|
mitem.ManyState = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
LabelParamModel lamodel = new LabelParamModel();
|
||||||
|
string address = item.Address.ToString();
|
||||||
|
lamodel.Address = address;
|
||||||
|
lamodel.ControlIP = item.ControlIP.ToString();
|
||||||
|
lamodel.Command = "DISPLAY_JOB";
|
||||||
|
lamodel.Uid = item.ID;
|
||||||
|
lamodel.Type = "N";
|
||||||
|
lamodel.Quantity = quantity.ToString();
|
||||||
|
lamodel.Uid = item.ID;
|
||||||
|
lamodel.Mode = queueDT.Rows[0]["lightcolor"].ToString() + "0";
|
||||||
|
|
||||||
|
list.Add(lamodel);
|
||||||
|
|
||||||
|
item.State = 1;
|
||||||
|
item.ColorCode = queueDT.Rows[0]["lightcolor"].ToString();
|
||||||
|
item.DisplayTime = DateTime.Now;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
// else
|
#region 点亮通道灯
|
||||||
//{
|
//comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
|
||||||
|
|
||||||
List<JobModel> manyJoblist = nowJoblist.FindAll(m => m.Tolocation == item.Tolocation);
|
|
||||||
int quantity = item.Quantity;
|
|
||||||
|
|
||||||
LabelParamModel lamodel = new LabelParamModel();
|
|
||||||
|
|
||||||
lamodel.Address = item.Address.ToString();
|
|
||||||
lamodel.ControlIP = item.ControlIP.ToString();
|
|
||||||
lamodel.Command = "DISPLAY_JOB";
|
|
||||||
|
|
||||||
#region 同一个货位的数据合并显示
|
|
||||||
//if (manyJoblist.Count > 1)
|
|
||||||
//{
|
|
||||||
// if (manyJoblist.FindAll(m => m.State == 0).Any())
|
|
||||||
// {
|
|
||||||
// foreach (JobModel mitem in manyJoblist)
|
|
||||||
// {
|
|
||||||
// quantity += mitem.Quantity;
|
|
||||||
// mitem.State = 1;
|
|
||||||
// mitem.ManyState = 1;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
lamodel.Uid = item.ID;
|
|
||||||
lamodel.Type = "N";
|
|
||||||
lamodel.Quantity = quantity.ToString();
|
|
||||||
lamodel.Uid = item.ID;
|
|
||||||
lamodel.Mode = queueDT.Rows[0]["lightcolor"].ToString() + "0";
|
|
||||||
|
|
||||||
list.Add(lamodel);
|
|
||||||
//}
|
|
||||||
|
|
||||||
item.State = 1;
|
|
||||||
item.ColorCode = queueDT.Rows[0]["lightcolor"].ToString();
|
|
||||||
item.DisplayTime = DateTime.Now;
|
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
#region 点亮通道灯
|
|
||||||
comBLL.DISPLAY_LIGHT_BLOCK(model.Taskblock, model.Taskarea, "1");
|
|
||||||
#endregion
|
|
||||||
if (list != null && list.Count > 0)
|
if (list != null && list.Count > 0)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("添加到点亮的list————————————————————:" + list.Count);
|
LogHelper.WriteLogInfo("添加到点亮的list————————————————————:" + list.Count);
|
||||||
@ -643,14 +621,15 @@ namespace Epost.BLL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
//else
|
||||||
|
//{
|
||||||
|
|
||||||
LogHelper.WriteLogInfo("还有未完成任务" + isJobList.Count);
|
// LogHelper.WriteLogInfo("还有未完成任务" + isJobList.Count);
|
||||||
foreach (JobModel item in isJobList)
|
// foreach (JobModel item in isJobList)
|
||||||
{
|
// {
|
||||||
LogHelper.WriteLogInfo("还有未完成任务"+item.Address+item.ID);
|
// LogHelper.WriteLogInfo("还有未完成任务" + item.Address + item.ID);
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -691,13 +670,168 @@ namespace Epost.BLL
|
|||||||
if (data.Type == "5")//中分扫描枪
|
if (data.Type == "5")//中分扫描枪
|
||||||
{
|
{
|
||||||
|
|
||||||
zhongfenBind(ulist, scanStr, data);
|
//zhongfenBind(ulist, scanStr, data);
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
}
|
}
|
||||||
else if (data.Type == "6")//播种扫描枪
|
else if (data.Type == "6")//播种扫描枪
|
||||||
{
|
{
|
||||||
|
|
||||||
xifenBind(ulist, scanStr, data, matchid, isnum);
|
var color = EnumHelper.EMToDescriptionString(LightColor.Color.Black);
|
||||||
|
var i = 0;
|
||||||
|
var content = string.Empty;
|
||||||
|
var d = false;
|
||||||
|
if (scanStr == "Finish")
|
||||||
|
{
|
||||||
|
dal.UpBkAddresss(data.Block, data.Area);
|
||||||
|
DataTable Mdt = dal.GetOrderMatchidInfo(data.Block, data.Area);
|
||||||
|
if (Mdt != null && Mdt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("----开始强制结束----运单号:" + Mdt.Rows[0]["matchid"].ToString() + "");
|
||||||
|
dal.UpOrdersMatchid(data.Block, data.Area, Mdt.Rows[0]["matchid"].ToString());
|
||||||
|
|
||||||
|
dal.UpOrdersqueue(data.Block, data.Area, Mdt.Rows[0]["matchid"].ToString());
|
||||||
|
LabelParamModel model = new LabelParamModel();
|
||||||
|
model.Address = "9999";
|
||||||
|
model.ControlIP = Mdt.Rows[0]["ControlIP"].ToString();
|
||||||
|
model.Parameter = "01";
|
||||||
|
comBLL.REMOVE_JOB(model);
|
||||||
|
comBLL.LED_OFF_CLEAR(Mdt.Rows[0]["ControlIP"].ToString());
|
||||||
|
|
||||||
|
color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
|
scanStr = "强制结束成功";
|
||||||
|
content = "运单号:" + Mdt.Rows[0]["matchid"].ToString() + "\r\r";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("----开始强制结束----无任务");
|
||||||
|
scanStr = "当前无任务";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataTable ifdt = dal.GetOrdersMatchidIf(scanStr);//判断扫描的是否为运单号
|
||||||
|
if (ifdt != null && ifdt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataTable bindt = dal.GetOrderMatchidBin(scanStr);
|
||||||
|
if (bindt == null || bindt.Rows.Count <= 0)
|
||||||
|
{
|
||||||
|
DataTable IFmatchid = dal.GetOrderMatchidLocation(data.Block, data.Area);
|
||||||
|
if (IFmatchid != null && IFmatchid.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("----------该运单号正在作业:" + IFmatchid.Rows[0]["matchid"].ToString() + "");
|
||||||
|
scanStr = "当前运单:" + scanStr + "";
|
||||||
|
content = "当前线路正在作业请勿扫描\r\r";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//循环为运单号分配货位
|
||||||
|
DataTable noadddt = dal.GetAddressNolocation(data.Block, data.Area);
|
||||||
|
foreach (DataRow item in ifdt.Rows)
|
||||||
|
{
|
||||||
|
if (noadddt.Rows.Count > i)
|
||||||
|
{
|
||||||
|
d = dal.UpOrderstolocation(item["shopid"].ToString(), noadddt.Rows[i]["location"].ToString(), scanStr);
|
||||||
|
}
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
if (d == true)
|
||||||
|
{
|
||||||
|
DataTable dtmt = dal.GetOrderinfoNumber(scanStr);
|
||||||
|
|
||||||
|
content = "车牌:" + dtmt.Rows[0]["clientname"].ToString() + "\r门店数:" + dtmt.Rows[0]["shopcount"].ToString() + "\r商品总数:" + dtmt.Rows[0]["qty"].ToString() + "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("----------该运单号已绑定:" + scanStr + "");
|
||||||
|
scanStr = "当前运单:" + scanStr + "";
|
||||||
|
content = "该运单已绑定请勿重复扫描\r\r";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataTable skutb = dal.GetSku(scanStr);
|
||||||
|
DataTable OrderDt = dal.GetOrderList_Car("", scanStr, data.Area, data.Block);
|
||||||
|
if (OrderDt != null && OrderDt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
DataTable dd = dal.getQueueState(data.Block, data.Area, "3");
|
||||||
|
|
||||||
|
if (dd != null && dd.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
content = "商品条码:" + skutb.Rows[0]["sku"].ToString() + "\r名称:" + skutb.Rows[0]["name"].ToString() + "\r";
|
||||||
|
scanStr = "该商品正在作业" + dd.Rows[0]["Sku"].ToString() + ",请勿扫描";
|
||||||
|
LogHelper.WriteLogInfo("该商品正在作业---sku:" + dd.Rows[0]["Sku"].ToString() + "");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
comBLL.LED_OFF_CLEAR(OrderDt.Rows[0]["controlip"].ToString());
|
||||||
|
|
||||||
|
OrdersQueueModel qmodel = new OrdersQueueModel();
|
||||||
|
qmodel.Taskblock = data.Block;
|
||||||
|
qmodel.Taskarea = data.Area;
|
||||||
|
qmodel.Matchid = OrderDt.Rows[0]["Matchid"].ToString();
|
||||||
|
qmodel.Sku = scanStr;
|
||||||
|
qmodel.Lightcolor = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
|
queueBLL.insertQueueOrders(qmodel);
|
||||||
|
|
||||||
|
#region 扫描sku点亮显示标签
|
||||||
|
DataTable dt = dal.GetSkuQuantity(scanStr, OrderDt.Rows[0]["Matchid"].ToString());
|
||||||
|
var sumqty = dt.Rows[0]["sumqty"].ToString();
|
||||||
|
|
||||||
|
string sizeinfo = string.Empty;
|
||||||
|
if (skutb != null)
|
||||||
|
{
|
||||||
|
double bigqty = 0, midqty = 0, lastqty = 0;
|
||||||
|
double bigsize = 0, midsize = 0;
|
||||||
|
if (skutb.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
bigsize = Convert.ToDouble(skutb.Rows[0]["plumn"].ToString());// 6
|
||||||
|
midsize = Convert.ToDouble(skutb.Rows[0]["spec"].ToString());// 1
|
||||||
|
if (bigsize != 0)
|
||||||
|
{
|
||||||
|
bigqty = (int)Math.Floor(Convert.ToDouble(sumqty) / bigsize);
|
||||||
|
sumqty = (Convert.ToDouble(sumqty) - (bigqty * bigsize)).ToString();
|
||||||
|
}
|
||||||
|
if (midsize != 0)
|
||||||
|
{
|
||||||
|
midqty = (int)Math.Floor(Convert.ToDouble(sumqty) / midsize);
|
||||||
|
sumqty = (Convert.ToDouble(sumqty) - (midqty * midsize)).ToString();
|
||||||
|
}
|
||||||
|
sizeinfo = "筐数:" + bigqty + "包数:" + midqty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sizeinfo = "总数:" + sumqty;
|
||||||
|
}
|
||||||
|
content = "名称:" + skutb.Rows[0]["name"].ToString() + "\r " + sizeinfo + " \r";
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
scanStr = "当前商品:" + scanStr + "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (skutb != null && skutb.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
content = "名称:" + skutb.Rows[0]["name"].ToString() + "\r\r";
|
||||||
|
}
|
||||||
|
|
||||||
|
scanStr = "条码:" + scanStr + ",无任务";
|
||||||
|
LogHelper.WriteLogInfo("该条码无任务---条码:" + scanStr + "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
||||||
|
showmodel.Area = data.Area;
|
||||||
|
showmodel.Block = data.Block;
|
||||||
|
showmodel.Color = color;
|
||||||
|
showmodel.Islock = true;
|
||||||
|
showmodel.Title = scanStr;
|
||||||
|
showmodel.IsTwinkle = 0;
|
||||||
|
showmodel.Contents = content;
|
||||||
|
showmodel.Type = 2;
|
||||||
|
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
|
||||||
|
|
||||||
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
downCacheDAL.UpdateJobDownModelList(new List<ResultMessageModel> { data }, EdownCommend.Execute);
|
||||||
}
|
}
|
||||||
@ -780,7 +914,7 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
foreach (AddressstorageModel item in Arealist)
|
foreach (AddressstorageModel item in Arealist)
|
||||||
{
|
{
|
||||||
DataTable skudt = orderbll.GetSumList("", scanStr, item.block,item.area);
|
DataTable skudt = orderbll.GetSumList("", scanStr, item.block, item.area);
|
||||||
if (skudt != null && skudt.Rows.Count > 0)
|
if (skudt != null && skudt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
//规格
|
//规格
|
||||||
@ -1087,7 +1221,7 @@ namespace Epost.BLL
|
|||||||
if (data != null)
|
if (data != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r"+ mes;
|
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r" + mes;
|
||||||
sku = data.Parameter;
|
sku = data.Parameter;
|
||||||
}
|
}
|
||||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Blue);
|
||||||
@ -1244,7 +1378,7 @@ namespace Epost.BLL
|
|||||||
int discount = Convert.ToInt32(sudt.Rows[0]["discount"].ToString());
|
int discount = Convert.ToInt32(sudt.Rows[0]["discount"].ToString());
|
||||||
//整件总数
|
//整件总数
|
||||||
int SumCkQuantity = 0; //Convert.ToInt32(sudt.Rows[0]["SumCkQuantity"].ToString());
|
int SumCkQuantity = 0; //Convert.ToInt32(sudt.Rows[0]["SumCkQuantity"].ToString());
|
||||||
//散件总数
|
//散件总数
|
||||||
int SumQuantity = Convert.ToInt32(sudt.Rows[0]["SumQuantity"].ToString());
|
int SumQuantity = Convert.ToInt32(sudt.Rows[0]["SumQuantity"].ToString());
|
||||||
//if (discount != 1)
|
//if (discount != 1)
|
||||||
//{
|
//{
|
||||||
@ -1261,11 +1395,11 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
if (qdt != null && qdt.Rows.Count > 0)
|
if (qdt != null && qdt.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
show.Contents = qdt.Rows[0]["location"].ToString() + "(" + scanStr + ")" + "\r"+ mes;//sudt.Rows[0]["goodscode"].ToString().Replace(';','\r');
|
show.Contents = qdt.Rows[0]["location"].ToString() + "(" + scanStr + ")" + "\r" + mes;//sudt.Rows[0]["goodscode"].ToString().Replace(';','\r');
|
||||||
}
|
}
|
||||||
if (data != null)
|
if (data != null)
|
||||||
{
|
{
|
||||||
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r"+ mes;// sudt.Rows[0]["goodscode"].ToString().Replace(';', '\r');
|
show.Contents = data.ScanCode + "(" + scanStr + ")" + "\r" + mes;// sudt.Rows[0]["goodscode"].ToString().Replace(';', '\r');
|
||||||
sku = data.Parameter;
|
sku = data.Parameter;
|
||||||
}
|
}
|
||||||
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
show.Color = EnumHelper.EMToDescriptionString(LightColor.Color.Green);
|
||||||
|
@ -222,7 +222,7 @@ namespace Epost.BLL
|
|||||||
public bool UpdateQueueState()
|
public bool UpdateQueueState()
|
||||||
{
|
{
|
||||||
BoxPickBLL bll = new BoxPickBLL();
|
BoxPickBLL bll = new BoxPickBLL();
|
||||||
dal.deleteBoxpick();
|
//dal.deleteBoxpick();
|
||||||
bool bo= dal.UpdateQueueState();
|
bool bo= dal.UpdateQueueState();
|
||||||
//if (bo)
|
//if (bo)
|
||||||
//{
|
//{
|
||||||
|
@ -165,7 +165,7 @@ namespace Epost.DAL
|
|||||||
{
|
{
|
||||||
strwhere = " and area='"+area+"'";
|
strwhere = " and area='"+area+"'";
|
||||||
}
|
}
|
||||||
string sql = string.Format("select address, bkaddress, state, type, area ,way ,shelfid, ControlID ,location ,layer, slist, block, addresstype, ControlIP, ControlType, info from V_address where type='{1}' and block='{0}' " + strwhere,
|
string sql = string.Format("select address,bkaddress,state,type,area,way,shelfid,ControlID,location,layer,slist,block,addresstype,ControlIP,ControlType,info from V_address where type='{1}' and block='{0}' " + strwhere,
|
||||||
block,
|
block,
|
||||||
|
|
||||||
type);
|
type);
|
||||||
@ -809,26 +809,5 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 灯带
|
|
||||||
#region 查询设备信息
|
|
||||||
public DataTable QueryAddrList(string strwhere)
|
|
||||||
{
|
|
||||||
string sql = string.Format("select * from v_address where 1=1 " + strwhere);
|
|
||||||
return db.GetsqlForDT(sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
#region 查询设备信息
|
|
||||||
public DataTable QueryControlList(string strwhere)
|
|
||||||
{
|
|
||||||
string sql = string.Format(" select distinct controlip ,port,waveno,address from v_address where 1=1 " + strwhere);
|
|
||||||
return db.GetsqlForDT(sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,99 +0,0 @@
|
|||||||
using LightContrl;
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace Epost.DAL.Cache
|
|
||||||
{
|
|
||||||
public class LightControlCacheDAL
|
|
||||||
{
|
|
||||||
|
|
||||||
private static object lockconobj = new object();
|
|
||||||
public static List<LightcontrolModel> MainControlList = new List<LightcontrolModel>();//
|
|
||||||
|
|
||||||
#region 获取计划任务列表
|
|
||||||
public List<LightcontrolModel> GetControlList()
|
|
||||||
{
|
|
||||||
return MainControlList;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#region 初始化任务列表
|
|
||||||
public void ClearControlList()
|
|
||||||
{
|
|
||||||
foreach (var planitem in MainControlList.ToArray())
|
|
||||||
{
|
|
||||||
MainControlList.Remove(planitem);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Job缓存处理方法
|
|
||||||
/// <summary>
|
|
||||||
/// Job缓存处理方法
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="JobParam"></param>
|
|
||||||
/// <param name="ECommend"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public bool UpdateControlList(List<LightcontrolModel> JobParam, EcontrolCommend CommendType)
|
|
||||||
{
|
|
||||||
|
|
||||||
lock (lockconobj)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (CommendType.Equals(EcontrolCommend.Create))
|
|
||||||
{
|
|
||||||
|
|
||||||
MainControlList.AddRange(JobParam);
|
|
||||||
}
|
|
||||||
|
|
||||||
else if (CommendType.Equals(EcontrolCommend.Execute))
|
|
||||||
{
|
|
||||||
foreach (var planitem in MainControlList.ToArray())
|
|
||||||
{
|
|
||||||
MainControlList.Remove(planitem);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
public enum EcontrolCommend
|
|
||||||
{
|
|
||||||
/// <summary>
|
|
||||||
/// 创建
|
|
||||||
/// </summary>
|
|
||||||
[Description("创建")]
|
|
||||||
Create,
|
|
||||||
/// <summary>
|
|
||||||
/// 删除
|
|
||||||
/// </summary>
|
|
||||||
[Description("删除")]
|
|
||||||
Execute
|
|
||||||
}
|
|
||||||
|
|
||||||
public class LightcontrolModel
|
|
||||||
{
|
|
||||||
private string _controlip = string.Empty;
|
|
||||||
private int _port ;
|
|
||||||
MainControl _maincontrol = new MainControl();
|
|
||||||
|
|
||||||
public MainControl maincontrol { get => _maincontrol; set => _maincontrol = value; }
|
|
||||||
public string controlip { get => _controlip; set => _controlip = value; }
|
|
||||||
public int port { get => _port; set => _port = value; }
|
|
||||||
}
|
|
||||||
}
|
|
@ -82,10 +82,6 @@
|
|||||||
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
<HintPath>..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="LightContrl, Version=3.0.2.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\DLL\LightContrl.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Configuration" />
|
<Reference Include="System.Configuration" />
|
||||||
@ -110,7 +106,6 @@
|
|||||||
<Compile Include="Cache\EPlightCacheDAL.cs" />
|
<Compile Include="Cache\EPlightCacheDAL.cs" />
|
||||||
<Compile Include="Cache\JobDownCacheDAL.cs" />
|
<Compile Include="Cache\JobDownCacheDAL.cs" />
|
||||||
<Compile Include="Cache\JobModelCacheDAL.cs" />
|
<Compile Include="Cache\JobModelCacheDAL.cs" />
|
||||||
<Compile Include="Cache\LightControlCacheDAL.cs" />
|
|
||||||
<Compile Include="Cache\LocationCacheDAL.cs" />
|
<Compile Include="Cache\LocationCacheDAL.cs" />
|
||||||
<Compile Include="Cache\ScanModelCacheDAL.cs" />
|
<Compile Include="Cache\ScanModelCacheDAL.cs" />
|
||||||
<Compile Include="Cache\ShowMesCacheDAL.cs" />
|
<Compile Include="Cache\ShowMesCacheDAL.cs" />
|
||||||
|
@ -48,7 +48,7 @@ namespace Epost.DAL
|
|||||||
string sql = string.Empty;
|
string sql = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(area))
|
if (!string.IsNullOrEmpty(area))
|
||||||
{
|
{
|
||||||
sql = string.Format("select id, ProdArea, LotNo, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, GoodsType, corlorcode, address, ControlIP,area, block,boxcode,bkbarcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
|
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP,area, block,unit,shopid from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block, area);
|
block, area);
|
||||||
@ -56,7 +56,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sql = string.Format("select id,ProdArea, LotNo, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, GoodsType, corlorcode, address, ControlIP, area , block,boxcode,bkbarcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
sql = string.Format("select id, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP, area , block,unit,shopid from v_orders where state = 0 and oprationstate <>3 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block);
|
block);
|
||||||
@ -90,7 +90,7 @@ namespace Epost.DAL
|
|||||||
string sql = string.Empty;
|
string sql = string.Empty;
|
||||||
if (!string.IsNullOrEmpty(area))
|
if (!string.IsNullOrEmpty(area))
|
||||||
{
|
{
|
||||||
sql = string.Format("select id,ProdArea, LotNo, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, GoodsType, corlorcode, address, ControlIP,area, block,boxcode,bkbarcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
|
sql = string.Format("select id,Matchid,orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP,area, block,bkbarcode,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and sku = '{0}' and block = '{1}' and area='{2}' " + strwhere + "",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block, area);
|
block, area);
|
||||||
@ -98,7 +98,7 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sql = string.Format("select id,ProdArea, LotNo, Matchid, orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, GoodsType, corlorcode, address, ControlIP, area , block,boxcode,bkbarcode,isnull(checkquantity,0) as checkquantity,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
sql = string.Format("select id,Matchid,orderid, barcode, BatchId, DownDate, Tolocation, Sku, GoodsName, Discount, Quantity, address, ControlIP, area , block,bkbarcode,wholeunit,unit,shopid,wmsboxcode from v_orders where state = 0 and sku = '{0}' and block = '{1}' " + strwhere + "",
|
||||||
|
|
||||||
sku,
|
sku,
|
||||||
block);
|
block);
|
||||||
@ -656,6 +656,7 @@ namespace Epost.DAL
|
|||||||
usercode
|
usercode
|
||||||
);
|
);
|
||||||
long x = db.UpdateSql(upsql);
|
long x = db.UpdateSql(upsql);
|
||||||
|
LogHelper.WriteLogInfo("修改当前标签拣货状态:" + upsql + ",成功条数:" + x + "");
|
||||||
if (x > 0)
|
if (x > 0)
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
@ -2492,6 +2493,373 @@ namespace Epost.DAL
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 三迎
|
||||||
|
//========三迎========
|
||||||
|
|
||||||
|
#region 查询扫描的是否为运单号
|
||||||
|
public DataTable GetOrdersMatchidIf(string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct matchid,shopid,shopname,prino+0 from Orders where matchid='" + matchid + "' order by prino+0 asc");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询可分配的货位
|
||||||
|
public DataTable GetAddressNolocation(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from Addressstorage where bkaddress='0' and type='1' and block='" + block + "' and area='" + area + "' order by location+1 asc");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 为orders分配货位
|
||||||
|
public bool UpOrderstolocation(string shopid, string tolocation, string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update Orders set tolocation='" + tolocation + "' where shopid='" + shopid + "' and matchid='" + matchid + "'");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("为orders分配货位:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
sql = string.Format("update Addressstorage set bkaddress='" + shopid + "' where location='" + tolocation + "' and bkaddress='0' ");
|
||||||
|
long b = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("更新Addressstorage货位为已占用:" + sql + ",成功条数:" + b + "");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询是否有正在作业的运单号
|
||||||
|
public DataTable GetOrderMatchidBin(string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from v_orders where tolocation!='' and matchid='" + matchid + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable GetOrderMatchidLocation(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from v_orders where tolocation!='' and block='" + block + "' and area='" + area + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable GetOrderMatchidInfo(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct matchid,ControlIP from v_orders where (tolocation!='' or tolocation is not null) and block='" + block + "' and area='" + area + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 强制结束修改状态
|
||||||
|
public bool UpOrdersMatchid(string block, string area, string matchid)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format("update orders set state='3' where tolocation!='' and matchid='" + matchid + "' ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("强制结束修改状态:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("强制结束修改状态异常:" + ex + "");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpBkAddresss(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update Addressstorage set bkaddress='0' where block='" + block + "' and area='" + area + "' ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("强制结束修改Addressstorage:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool UpOrdersqueue(string block, string area, string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update ordersqueue set state='3' where Taskblock='" + block + "' and Taskarea='" + area + "' and matchid='" + matchid + "' ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("强制结束修改ordersqueue:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 查询
|
||||||
|
public DataTable GetSkuQuantity(string sku, string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select sum(quantity) sumqty from Orders where sku='" + sku + "' and matchid='" + matchid + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataTable GetSku(string sku)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from SkuInfo where sku = '" + sku + "' ");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 释放播种位
|
||||||
|
public bool UpdateLocation(string block, string area)
|
||||||
|
{
|
||||||
|
string sql = string.Format("update Addressstorage set bkaddress='0' where block='" + block + "' and area='" + area + "' and type='1' ");
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("运单完成-释放播种位:" + sql + ",条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MyRegion
|
||||||
|
public bool UpdateWorkState_DPS(string matchid, int truequantity, string sku, int batchid, int checkquantity, string usercode = "")
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
lock (uplock)
|
||||||
|
{
|
||||||
|
int oprationstate = 3;
|
||||||
|
|
||||||
|
string upsql = string.Format("update Orders set oprationstate = '{3}' ,oprationtime='{0}',oprationcode='{5}',truequantity=quantity where matchid='{2}' and id='{4}' ",
|
||||||
|
DateTime.Now.ToString(),
|
||||||
|
truequantity,
|
||||||
|
matchid,
|
||||||
|
oprationstate,
|
||||||
|
batchid,
|
||||||
|
//checkquantity,
|
||||||
|
usercode
|
||||||
|
);
|
||||||
|
LogHelper.WriteLogInfo("-修改orders" + upsql);
|
||||||
|
long x = db.UpdateSql(upsql);
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("修改orders异常:" + upsql, LogHelper.Log_Type.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("修改当前标签拣货状态异常:" + ex.Message);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region
|
||||||
|
public DataTable GetOrderinfoNumber(string matchid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select distinct matchid,clientname,COUNT(distinct shopid) 'shopcount',count(distinct sku) qty from Orders where matchid='" + matchid + "' and isnull(tolocation,0)>0 group by matchid,clientname");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region MyRegion
|
||||||
|
public bool ImportOrderinfo(DataTable ds, Dictionary<string, string> diclist)
|
||||||
|
{
|
||||||
|
|
||||||
|
bool bo = db.UpdateData(ds, "orders", diclist);
|
||||||
|
if (bo)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("添加取消订单失败");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 数据维护
|
||||||
|
public bool DelOrderSku()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format("delete from Orders where sku not in (select sku from SkuInfo) ");
|
||||||
|
long x = db.DeleteSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("数据维护:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("数据维护异常:" + ex + "", LogHelper.Log_Type.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 导入数据清理之前orders
|
||||||
|
public void DelOrdersBeforeDate()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format("insert into Ordershis select * from Orders");
|
||||||
|
long x = db.InsertSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("导入数据清理之前orders:" + sql + ",成功条数:" + x + "");
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
sql = string.Format("delete from Orders");
|
||||||
|
x = db.DeleteSql(sql);
|
||||||
|
LogHelper.WriteLogInfo("清理orders数据:" + sql + ",成功条数:" + x + "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("导入数据清理之前orders异常:" + ex.Message + "", LogHelper.Log_Type.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 运单用时
|
||||||
|
public List<OrdersModel> GetMatchUserTimeByPage(string strWhere, string orderby, int startIndex, int endIndex, out int recordCount)
|
||||||
|
{
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
StringBuilder strSql = new StringBuilder();
|
||||||
|
strSql.Append("SELECT * FROM ( ");
|
||||||
|
strSql.Append(" SELECT ROW_NUMBER() OVER (");
|
||||||
|
if (!string.IsNullOrEmpty(orderby.Trim()))
|
||||||
|
{
|
||||||
|
strSql.Append("order by T." + orderby);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
strSql.Append("order by matchid asc");
|
||||||
|
}
|
||||||
|
strSql.Append(")AS Row,matchid as matchid,clientname as clientname,count(distinct(shopid)) as ShopCount,MIN(CONVERT(datetime,oprationtime)) AS starttime,MAX(CONVERT(datetime,oprationtime)) AS endtime,DATEDIFF(MINUTE,MIN(CONVERT(datetime,oprationtime)),MAX(CONVERT(datetime,oprationtime))) AS UseTime FROM Ordershis where 1=1 " + strWhere + " GROUP BY matchid,clientname ");
|
||||||
|
strSql.Append(" ) TT");
|
||||||
|
strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
|
||||||
|
List<OrdersModel> list = ModelConvertHelper<OrdersModel>.ConvertToList(db.GetsqlForDT(strSql.ToString()));
|
||||||
|
|
||||||
|
strSql.Remove(0, strSql.Length);
|
||||||
|
strSql.Append("SELECT count(distinct matchid) FROM Ordershis");
|
||||||
|
if (!string.IsNullOrEmpty(strWhere.Trim()))
|
||||||
|
{
|
||||||
|
strSql.AppendFormat(" WHERE 1=1 {0}", strWhere);
|
||||||
|
}
|
||||||
|
|
||||||
|
object obj = db.GetsqlForDT(strSql.ToString()).Rows[0][0];
|
||||||
|
if (obj != null)
|
||||||
|
recordCount = Convert.ToInt32(obj);
|
||||||
|
else
|
||||||
|
recordCount = 0;
|
||||||
|
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLog(GetType(), ex.Message);
|
||||||
|
recordCount = 0;
|
||||||
|
return new List<Model.OrdersModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public DataTable GetMatchUserTime_DT(string strWhere)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string sql = string.Format("SELECT matchid as matchid,clientname as clientname,count(distinct(shopid)) as ShopCount,MIN(CONVERT(datetime,oprationtime)) AS starttime,MAX(CONVERT(datetime,oprationtime)) AS endtime,DATEDIFF(MINUTE,MIN(CONVERT(datetime,oprationtime)),MAX(CONVERT(datetime,oprationtime))) AS UseTime FROM Ordershis where 1=1 " + strWhere + " GROUP BY matchid,clientname ");
|
||||||
|
|
||||||
|
return db.GetsqlForDT(sql.ToString());
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLog(GetType(), ex.Message);
|
||||||
|
return new DataTable();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取当前区的作业状态
|
||||||
|
public DataTable getQueueState(string block, string area, string state)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from OrdersQueue where taskblock='{0}' and taskarea='{1}' and state!='" + state + "' order by sort",
|
||||||
|
block,
|
||||||
|
area);
|
||||||
|
return db.GetsqlForDT(sql);
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 判断订单状态为已完成
|
||||||
|
public bool IsFinishWork_box(string boxcode, int endcount, string matchid = "")
|
||||||
|
{
|
||||||
|
string sql = string.Format("select matchid from Orders where (matchid='{0}') and oprationstate<>3",
|
||||||
|
matchid);
|
||||||
|
|
||||||
|
|
||||||
|
LogHelper.WriteLogInfo("判断整箱状态为已完成" + sql);
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
if (dt == null || dt.Rows.Count == endcount)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("判断整箱状态为已完成true");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("判断整箱状态为已完成false");
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,18 +9,10 @@ namespace Epost.Model
|
|||||||
public class OrderModel
|
public class OrderModel
|
||||||
{
|
{
|
||||||
|
|
||||||
private string _wallNo = string.Empty;
|
private string _OrderNO = string.Empty;
|
||||||
private string _location = string.Empty;
|
private string _State = string.Empty;// 1亮灯 0灭灯
|
||||||
private string _lightColor = string.Empty;
|
|
||||||
private string _lightType = string.Empty;
|
|
||||||
private string _brightness = string.Empty;
|
|
||||||
private string _status = string.Empty;
|
|
||||||
|
|
||||||
public string wallNo { get => _wallNo; set => _wallNo = value; }
|
public string OrderNO { get => _OrderNO; set => _OrderNO = value; }
|
||||||
public string lcation { get => _location; set => _location = value; }
|
public string State { get => _State; set => _State = value; }
|
||||||
public string lightColor { get => _lightColor; set => _lightColor = value; }
|
|
||||||
public string lightType { get => _lightType; set => _lightType = value; }
|
|
||||||
public string brightness { get => _brightness; set => _brightness = value; }
|
|
||||||
public string status { get => _status; set => _status = value; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -37,91 +37,4 @@ namespace Epost.Model
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SerResultModel
|
|
||||||
{
|
|
||||||
private string _resultCode = string.Empty;
|
|
||||||
private string _resultMsg = string.Empty;
|
|
||||||
|
|
||||||
public string resultCode { get => _resultCode; set => _resultCode = value; }
|
|
||||||
public string resultMsg { get => _resultMsg; set => _resultMsg = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
public class TaskReqModel
|
|
||||||
{
|
|
||||||
private string matchid = string.Empty;
|
|
||||||
private string orderid = string.Empty;
|
|
||||||
private string sku = string.Empty;
|
|
||||||
private string tolocation = string.Empty;
|
|
||||||
private string originalBatch = string.Empty;
|
|
||||||
private string block = string.Empty;
|
|
||||||
private string area = string.Empty;
|
|
||||||
private string _id = string.Empty;
|
|
||||||
public string Matchid { get => matchid; set => matchid = value; }
|
|
||||||
public string Orderid { get => orderid; set => orderid = value; }
|
|
||||||
public string Sku { get => sku; set => sku = value; }
|
|
||||||
public string Tolocation { get => tolocation; set => tolocation = value; }
|
|
||||||
public string OriginalBatch { get => originalBatch; set => originalBatch = value; }
|
|
||||||
public string Block { get => block; set => block = value; }
|
|
||||||
public string Area { get => area; set => area = value; }
|
|
||||||
public string id { get => _id; set => _id = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class ResultLightModel
|
|
||||||
{
|
|
||||||
private string _resultCode = string.Empty;
|
|
||||||
private string _resultMsg = string.Empty;
|
|
||||||
|
|
||||||
public string resultCode
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _resultCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_resultCode = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public string resultMsg
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return _resultMsg;
|
|
||||||
}
|
|
||||||
|
|
||||||
set
|
|
||||||
{
|
|
||||||
_resultMsg = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class reqmodel
|
|
||||||
{
|
|
||||||
public string wallNo { get; set; }
|
|
||||||
public string lightType { get; set; }
|
|
||||||
public string lightColor { get; set; }
|
|
||||||
public string status { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public class DisplayjobModelReq
|
|
||||||
{
|
|
||||||
public string wallNo { get; set; }
|
|
||||||
public string location { get; set; }
|
|
||||||
public string lightColor { get; set; }
|
|
||||||
public string lightType { get; set; }
|
|
||||||
public string brightness { get; set; }
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,6 @@ namespace Epost.TestToolsWeb.Controllers
|
|||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ViewBag.isClear = isClear;
|
ViewBag.isClear = isClear;
|
||||||
ViewBag.isWork = isWork;
|
ViewBag.isWork = isWork;
|
||||||
return View();
|
return View();
|
||||||
|
@ -5,305 +5,167 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using System.Web.Http;
|
|
||||||
using LightContrl;
|
|
||||||
|
|
||||||
using Epost.DAL.Cache;
|
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using Microsoft.Owin.BuilderProperties;
|
using System.Net.Http;
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
namespace Epost.DPS.Controllers
|
namespace Epost.DPS.Controllers
|
||||||
{
|
{
|
||||||
[RoutePrefix("api/TaskAPI")]
|
[RoutePrefix("api/WebAPI")]
|
||||||
public class ServerController : ApiController
|
public class ServerController : ApiController
|
||||||
{
|
{
|
||||||
AddressstorageBLL addrbll = new AddressstorageBLL();
|
private static object lockinit = new object();
|
||||||
LightControlCacheDAL cachedal = new LightControlCacheDAL();
|
|
||||||
MainControl lig = new MainControl();
|
|
||||||
#region 连接
|
|
||||||
[Route("CONNECT")]
|
|
||||||
[HttpPost]
|
|
||||||
public ResultLightModel CONNECT([FromBody] List<reqmodel> data)
|
|
||||||
{
|
|
||||||
ResultLightModel res = new ResultLightModel();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo("CONNECT请求" + JsonHelper.SerializeObject(data));
|
|
||||||
if (data.Any() && data.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (var item in data)
|
|
||||||
{
|
|
||||||
if (item.status == "1")//连接
|
|
||||||
{
|
|
||||||
DataTable dt = addrbll.QueryControlList(" and waveno ='" + item.wallNo + "'");
|
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (DataRow rowitem in dt.Rows)
|
|
||||||
{
|
|
||||||
|
|
||||||
string ipaddress = rowitem["controlip"].ToString().Trim();
|
OrderControlBLL contrbll = new OrderControlBLL();
|
||||||
List<LightcontrolModel> conlist = cachedal.GetControlList().FindAll(o => o.controlip == ipaddress);
|
|
||||||
if (conlist != null && conlist.Count > 0)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo(ipaddress + "已连接!");
|
|
||||||
res.resultCode = "0";
|
|
||||||
res.resultMsg = "成功!";
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
int port = Convert.ToInt32(rowitem["port"].ToString().Trim());
|
|
||||||
int timeout = 2000;
|
|
||||||
bool bo = lig.Connect(ipaddress, port, timeout);//timeout 毫秒
|
|
||||||
if (bo)
|
|
||||||
{
|
|
||||||
LightcontrolModel model = new LightcontrolModel();
|
|
||||||
model.controlip = ipaddress;
|
|
||||||
model.maincontrol = lig;
|
|
||||||
model.port = port;
|
|
||||||
cachedal.UpdateControlList(new List<LightcontrolModel> { model }, EcontrolCommend.Create);
|
|
||||||
res.resultCode = "0";
|
|
||||||
res.resultMsg = "成功!";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = "连接失败" + ipaddress;
|
|
||||||
LogHelper.WriteLogInfo("连接失败" + ipaddress);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
//初始化
|
||||||
else
|
|
||||||
{
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = "播种墙号错误";
|
|
||||||
LogHelper.WriteLogInfo("播种墙号错误");
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
LogHelper.WriteLogInfo("断开连接");
|
|
||||||
List<LightcontrolModel> conlist = cachedal.GetControlList();
|
|
||||||
if (conlist.Any() && conlist.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (LightcontrolModel con in conlist)
|
|
||||||
{
|
|
||||||
bool b= con.maincontrol.DisConnect(con.controlip,con.port);
|
|
||||||
LogHelper.WriteLogInfo(b+"断开连接"+ con.controlip+"=="+con.port);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
cachedal.ClearControlList();
|
|
||||||
res.resultCode = "0";
|
|
||||||
res.resultMsg = "断开连接成功!";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo(ex.ToString(), LogHelper.Log_Type.ERROR);
|
|
||||||
res.resultMsg = "请求接口异常!";
|
|
||||||
res.resultCode = "-1";
|
|
||||||
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 全亮全灭
|
|
||||||
[Route("LEDON")]
|
|
||||||
[HttpPost]
|
|
||||||
public ResultLightModel LEDON([FromBody] List<reqmodel> data)
|
|
||||||
{
|
|
||||||
ResultLightModel res = new ResultLightModel();
|
|
||||||
try
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo("LEDON请求" + JsonHelper.SerializeObject(data));
|
|
||||||
if (data.Any() && data.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (var item in data)
|
|
||||||
{
|
|
||||||
|
|
||||||
//根据播种墙号查询灯带IP
|
|
||||||
DataTable dt = addrbll.QueryControlList(" and waveno ='" + item.wallNo + "'");
|
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (DataRow rowitem in dt.Rows)
|
|
||||||
{
|
|
||||||
string ipaddress = rowitem["controlip"].ToString().Trim();
|
|
||||||
List<LightcontrolModel> conlist = cachedal.GetControlList().FindAll(o => o.controlip == ipaddress);
|
|
||||||
if (conlist != null && conlist.Count > 0)
|
|
||||||
{
|
|
||||||
|
|
||||||
MainControl control = conlist.FirstOrDefault().maincontrol;
|
|
||||||
bool bo = false;
|
|
||||||
string Address = dt.Rows[0]["address"].ToString().Trim();
|
|
||||||
string resstr = string.Empty;
|
|
||||||
if (item.lightType == "0")
|
|
||||||
{
|
|
||||||
|
|
||||||
bo = control.LED_OFF(ipaddress, Address,ref resstr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
bo = control.LED_ON(ipaddress, Address, ref resstr, "3", "0" , item.lightColor.Trim());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (bo)
|
|
||||||
{
|
|
||||||
res.resultCode = "0";
|
|
||||||
res.resultMsg = "成功!";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = "失败";
|
|
||||||
LogHelper.WriteLogInfo(ipaddress+"失败!" +resstr);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = "请先连接设备";
|
|
||||||
LogHelper.WriteLogInfo("请先连接设备!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = "播种墙号错误!";
|
|
||||||
LogHelper.WriteLogInfo("播种墙号错误", LogHelper.Log_Type.ERROR);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = "请求参数错误!";
|
|
||||||
LogHelper.WriteLogInfo("请求参数错误!");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo(ex.ToString(), LogHelper.Log_Type.ERROR);
|
|
||||||
res.resultMsg = "请求接口异常!";
|
|
||||||
res.resultCode = "-1";
|
|
||||||
|
|
||||||
}
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 根据货位点亮/熄灭格口
|
|
||||||
[Route("DISPLAYJOB")]
|
[Route("DISPLAYJOB")]
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public ResultLightModel DISPLAYJOB([FromBody] List<DisplayjobModelReq> data)
|
public ResultModel DISPLAYJOB(OrderModel model)
|
||||||
{
|
{
|
||||||
ResultLightModel res = new ResultLightModel();
|
lock (lockinit)
|
||||||
try
|
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo("DISPLAYJOB请求" + JsonHelper.SerializeObject(data));
|
ResultModel res = new ResultModel();
|
||||||
if (data.Any() && data.Count > 0)
|
try
|
||||||
{
|
{
|
||||||
foreach (DisplayjobModelReq item in data)
|
LogHelper.WriteLogInfo(JsonHelper.SerializeObject(model));
|
||||||
{
|
res.result = "0";
|
||||||
//根据播种墙号查询灯带IP
|
res.msg = "成功!";
|
||||||
DataTable dt = addrbll.QueryControlList(" and waveno ='" + item.wallNo + "'");
|
return res;
|
||||||
if (dt != null && dt.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
foreach (DataRow rowitem in dt.Rows)
|
|
||||||
{
|
|
||||||
string ipaddress = rowitem["controlip"].ToString().Trim();
|
|
||||||
List<LightcontrolModel> conlist = cachedal.GetControlList().FindAll(o => o.controlip == ipaddress);
|
|
||||||
if (conlist != null && conlist.Count > 0)
|
|
||||||
{
|
|
||||||
MainControl control = conlist.FirstOrDefault().maincontrol;
|
|
||||||
DataTable locdt = addrbll.QueryAddrList(" and waveno ='" + item.wallNo + "' and location ='" + item.location + "' and controlip='" + ipaddress + "'");
|
|
||||||
if (locdt != null && locdt.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
List<LightParagraph> list = new List<LightParagraph>();
|
|
||||||
string address = locdt.Rows[0]["address"].ToString().Trim();
|
|
||||||
foreach (DataRow locitem in locdt.Rows)
|
|
||||||
{
|
|
||||||
//根据播种墙号、格口号查询播种墙ip及灯带地址
|
|
||||||
|
|
||||||
LightParagraph show = new LightParagraph();
|
|
||||||
show.WayNu = Convert.ToInt32(locitem["wayno"].ToString().Trim());
|
|
||||||
show.LightBeganNu = locitem["beginno"].ToString().Trim();
|
|
||||||
show.LightEndNu = locitem["endno"].ToString().Trim();
|
|
||||||
show.LightColor = item.lightColor.Trim(); //1:蓝色 2:绿色 3:青色 4:红色 5:紫色 6黄色 7白色
|
|
||||||
show.Brightness = item.brightness.Trim();//亮度 1-9
|
|
||||||
list.Add(show);
|
|
||||||
|
|
||||||
}
|
|
||||||
string resstr = string.Empty;
|
|
||||||
bool bo = control.LED_By_Paragraph(ipaddress, address, list,ref resstr);
|
|
||||||
if (bo)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo("成功" + ipaddress+"list:"+JsonHelper.SerializeObject(list));
|
|
||||||
res.resultCode = "0";
|
|
||||||
res.resultMsg = "成功!";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo("失败"+ ipaddress + "list:" + JsonHelper.SerializeObject(list),LogHelper.Log_Type.ERROR);
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = resstr;
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = "请先连接设备!";
|
|
||||||
LogHelper.WriteLogInfo("请先连接设备!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
res.resultCode = "-1";
|
|
||||||
res.resultMsg = "播种墙号错误!";
|
|
||||||
LogHelper.WriteLogInfo("播种墙号错误!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("GetDataList异常:" + ex.Message);
|
||||||
|
res.msg = "请求异常!";
|
||||||
|
res.result = "-1";
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
//初始化
|
||||||
|
[Route("ClearALL")]
|
||||||
|
[HttpPost]
|
||||||
|
public ResultModel ClearALL()
|
||||||
|
{
|
||||||
|
lock (lockinit)
|
||||||
|
{
|
||||||
|
ResultModel res = new ResultModel();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
res = contrbll.ClearALL();
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("GetDataList异常:" + ex.Message);
|
||||||
|
res.msg = "请求异常!";
|
||||||
|
res.result = "-1";
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
[Route("StartWork")]
|
||||||
|
[HttpPost]
|
||||||
|
public ResultModel StartWork()
|
||||||
|
{
|
||||||
|
lock (lockinit)
|
||||||
|
{
|
||||||
|
ResultModel res = new ResultModel();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
contrbll.StartWork();
|
||||||
|
res.msg = "成功!";
|
||||||
|
res.result = "0";
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
|
||||||
|
LogHelper.WriteLogInfo("启动作业异常" + ex.ToString(), LogHelper.Log_Type.ERROR);
|
||||||
|
res.msg = "启动作业异常!";
|
||||||
|
res.result = "-1";
|
||||||
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 设备检测
|
||||||
|
[Route("TestStart")]
|
||||||
|
[HttpPost]
|
||||||
|
public ResultModel TestStart()
|
||||||
|
{
|
||||||
|
lock (lockinit)
|
||||||
{
|
{
|
||||||
LogHelper.WriteLogInfo(ex.ToString(), LogHelper.Log_Type.ERROR);
|
ResultModel res = new ResultModel();
|
||||||
res.resultMsg = "请求接口异常!";
|
try
|
||||||
res.resultCode = "-1";
|
{
|
||||||
|
ResultModel result = contrbll.TestStart();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("GetDataList异常:" + ex.Message);
|
||||||
|
res.msg = "请求异常!";
|
||||||
|
res.result = "-1";
|
||||||
|
return res;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return res;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region 停止检测
|
||||||
|
[Route("TestEnd")]
|
||||||
|
[HttpPost]
|
||||||
|
public ResultModel TestEnd()
|
||||||
|
{
|
||||||
|
lock (lockinit)
|
||||||
|
{
|
||||||
|
ResultModel res = new ResultModel();
|
||||||
|
contrbll.TestEnd();
|
||||||
|
res.msg = "成功!";
|
||||||
|
res.result = "0";
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 停止作业
|
||||||
|
[Route("EndWork")]
|
||||||
|
[HttpPost]
|
||||||
|
public ResultModel EndWork()
|
||||||
|
{
|
||||||
|
lock (lockinit)
|
||||||
|
{
|
||||||
|
ResultModel res = new ResultModel();
|
||||||
|
contrbll.EndWork();
|
||||||
|
res.msg = "成功!";
|
||||||
|
res.result = "0";
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -61,10 +61,6 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\DLL\ExcelIntOut.dll</HintPath>
|
<HintPath>..\DLL\ExcelIntOut.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="LightContrl, Version=3.0.2.0, Culture=neutral, processorArchitecture=MSIL">
|
|
||||||
<SpecificVersion>False</SpecificVersion>
|
|
||||||
<HintPath>..\DLL\LightContrl.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="Microsoft.AI.Agent.Intercept, Version=1.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.AI.Agent.Intercept, Version=1.2.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\lib\net45\Microsoft.AI.Agent.Intercept.dll</HintPath>
|
<HintPath>..\packages\Microsoft.ApplicationInsights.Agent.Intercept.1.2.1\lib\net45\Microsoft.AI.Agent.Intercept.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
@ -874,6 +870,18 @@
|
|||||||
<Content Include="Views\_ViewStart.cshtml" />
|
<Content Include="Views\_ViewStart.cshtml" />
|
||||||
<Content Include="Views\Home\Index.cshtml" />
|
<Content Include="Views\Home\Index.cshtml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Content Include="Log\fonts\glyphicons-halflings-regular.woff" />
|
||||||
|
<Content Include="Log\fonts\glyphicons-halflings-regular.ttf" />
|
||||||
|
<Content Include="Log\fonts\glyphicons-halflings-regular.eot" />
|
||||||
|
<Content Include="packages.config" />
|
||||||
|
<None Include="Project_Readme.html" />
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="App_Data\" />
|
||||||
|
<Folder Include="File\" />
|
||||||
|
<Folder Include="Models\" />
|
||||||
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\Common\Epost.Common.csproj">
|
<ProjectReference Include="..\Common\Epost.Common.csproj">
|
||||||
<Project>{44c36ca3-d672-40d1-ac94-91115de29a2d}</Project>
|
<Project>{44c36ca3-d672-40d1-ac94-91115de29a2d}</Project>
|
||||||
@ -892,18 +900,6 @@
|
|||||||
<Name>Epost.Model</Name>
|
<Name>Epost.Model</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<Content Include="Log\fonts\glyphicons-halflings-regular.woff" />
|
|
||||||
<Content Include="Log\fonts\glyphicons-halflings-regular.ttf" />
|
|
||||||
<Content Include="Log\fonts\glyphicons-halflings-regular.eot" />
|
|
||||||
<Content Include="packages.config" />
|
|
||||||
<None Include="Project_Readme.html" />
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="App_Data\" />
|
|
||||||
<Folder Include="File\" />
|
|
||||||
<Folder Include="Models\" />
|
|
||||||
</ItemGroup>
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
|
||||||
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
<WebStackScaffolding_LayoutPageFile>~/Views/Shared/_EpostLayoutPage.cshtml</WebStackScaffolding_LayoutPageFile>
|
<WebStackScaffolding_LayoutPageFile>~/Views/Shared/_EpostLayoutPage.cshtml</WebStackScaffolding_LayoutPageFile>
|
||||||
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
<WebStackScaffolding_IsAsyncSelected>False</WebStackScaffolding_IsAsyncSelected>
|
||||||
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
<WebStackScaffolding_ViewDialogWidth>600</WebStackScaffolding_ViewDialogWidth>
|
||||||
<NameOfLastUsedPublishProfile>E:\WORK\代码管理\T系列\播种\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
<NameOfLastUsedPublishProfile>D:\驿传\Epost\T_DAS_PTL\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
||||||
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
<IISExpressAnonymousAuthentication />
|
<IISExpressAnonymousAuthentication />
|
||||||
|
@ -28,21 +28,8 @@ namespace Epost.TestToolsWeb
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 跨域设置
|
|
||||||
/// </summary>
|
|
||||||
public void Application_BeginRequest()
|
|
||||||
{
|
|
||||||
//OPTIONS请求方法的主要作用:
|
|
||||||
//1、获取服务器支持的HTTP方法;也就是黑客经常用的方法。
|
|
||||||
//2、用来检查服务器的性能。如Ajax进行跨域请求是的预检,需要想另外一个域名的资源发送OPTIONS请求头,用以判断发送的请求是否安全
|
|
||||||
if (Request.Headers.AllKeys.Contains("Origin") && Request.HttpMethod == "OPTIONS")
|
|
||||||
{
|
|
||||||
//表示对输出的内容进行缓冲,执行page.Response.Flush()时,会等所有内容缓冲完毕,将内容发送到客户端
|
|
||||||
//这样就不会出错,造成页面卡死状态,让用户无限制等下去
|
|
||||||
Response.Flush();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -9,13 +9,13 @@
|
|||||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||||
<SiteUrlToLaunchAfterPublish />
|
<SiteUrlToLaunchAfterPublish />
|
||||||
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
|
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||||
<ExcludeApp_Data>False</ExcludeApp_Data>
|
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||||
<publishUrl>D:\驿传\T系列</publishUrl>
|
<publishUrl>D:\驿传\SanYing_DAS-T后台</publishUrl>
|
||||||
<DeleteExistingFiles>True</DeleteExistingFiles>
|
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||||
<PrecompileBeforePublish>True</PrecompileBeforePublish>
|
<PrecompileBeforePublish>true</PrecompileBeforePublish>
|
||||||
<EnableUpdateable>True</EnableUpdateable>
|
<EnableUpdateable>true</EnableUpdateable>
|
||||||
<DebugSymbols>False</DebugSymbols>
|
<DebugSymbols>false</DebugSymbols>
|
||||||
<WDPMergeOption>DonotMerge</WDPMergeOption>
|
<WDPMergeOption>DonotMerge</WDPMergeOption>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@
|
|||||||
</configSections>
|
</configSections>
|
||||||
<connectionStrings>
|
<connectionStrings>
|
||||||
<add name="weijie_dpsEntities" connectionString="metadata=res://*/WJDB.csdl|res://*/WJDB.ssdl|res://*/WJDB.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=weijie_dps;user id=sa;password=123456;min pool size=4;max pool size=4;packet size=3072;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
<add name="weijie_dpsEntities" connectionString="metadata=res://*/WJDB.csdl|res://*/WJDB.ssdl|res://*/WJDB.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=weijie_dps;user id=sa;password=123456;min pool size=4;max pool size=4;packet size=3072;MultipleActiveResultSets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />
|
||||||
<add name="SqlLocDPSConnection" connectionString="server=139.196.36.200;user id=EpostTest;password=antion;database=taitan_dengdai;min pool size=512;max pool size=512;packet size=3072" providerName="System.Data.SqlClient" />
|
<add name="SqlLocDPSConnection" connectionString="server=139.196.36.200;user id=EpostTest;password=antion;database=BaBi_DAS;min pool size=512;max pool size=512;packet size=3072" providerName="System.Data.SqlClient" />
|
||||||
<add name="MysqlLocDPSConnection" connectionString="Server=localhost;Port=3306;Database=world;User=root; Password=antion;SslMode=None;Pooling=true;Allow User Variables=True;" />
|
<add name="MysqlLocDPSConnection" connectionString="Server=localhost;Port=3306;Database=world;User=root; Password=antion;SslMode=None;Pooling=true;Allow User Variables=True;" />
|
||||||
|
|
||||||
<add name="WMSConnection" connectionString="data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=139.196.36.200)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=EpostDB)));user id=C##Test;password=test" />
|
<add name="WMSConnection" connectionString="data source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=139.196.36.200)(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=EpostDB)));user id=C##Test;password=test" />
|
||||||
@ -27,14 +27,12 @@
|
|||||||
<add key="ControlXML" value="/App_Data/EpostController.xml" />
|
<add key="ControlXML" value="/App_Data/EpostController.xml" />
|
||||||
<add key="LabelXML" value="/App_Data/AddressStorage.xml" />
|
<add key="LabelXML" value="/App_Data/AddressStorage.xml" />
|
||||||
<add key="ResultsXML" value="/App_Data/Results.xml" />
|
<add key="ResultsXML" value="/App_Data/Results.xml" />
|
||||||
<add key="WebAPIUrl" value="http://192.168.3.65:8051/api/WebAPI/ProcessingResult"/>
|
<add key="WebAPIUrl" value="http://localhost:63119/api/WebAPI/ProcessingResult"/>
|
||||||
<add key="ShowMode" value="1" />
|
<add key="ShowMode" value="1" />
|
||||||
<add key="SetupMode" value="\Epost_P\Epost.TestToolsWeb\App_Data\SetupMode.txt" />
|
<add key="SetupMode" value="\Epost_P\Epost.TestToolsWeb\App_Data\SetupMode.txt" />
|
||||||
<add key="CARID" value="HT01" />
|
<add key="CARID" value="HT01" />
|
||||||
<add key="ServerAPIURL" value="http://192.168.3.65:8051/api/WebAPI" />
|
<add key="ServerAPIURL" value="http://localhost:63119/api/WebAPI" />
|
||||||
<add key="SleepTime" value="1" />
|
<add key="SleepTime" value="1" />
|
||||||
|
|
||||||
|
|
||||||
</appSettings>
|
</appSettings>
|
||||||
<!--
|
<!--
|
||||||
有关 web.config 更改的说明,请参见 http://go.microsoft.com/fwlink/?LinkId=235367。
|
有关 web.config 更改的说明,请参见 http://go.microsoft.com/fwlink/?LinkId=235367。
|
||||||
@ -57,18 +55,6 @@
|
|||||||
<sessionState mode="InProc" timeout="518400" />
|
<sessionState mode="InProc" timeout="518400" />
|
||||||
</system.web>
|
</system.web>
|
||||||
<system.webServer>
|
<system.webServer>
|
||||||
<!-- 跨域访问配置 -->
|
|
||||||
<httpProtocol>
|
|
||||||
<customHeaders>
|
|
||||||
<!--相应类型(值为逗号分隔的一个字符串,表明服务器支持的所有跨域请求的方法)-->
|
|
||||||
<add name="Access-Control-Allow-Methods" value="GET, POST, PUT, DELETE, OPTIONS"/>
|
|
||||||
<!--响应头设置(Content-Type:只限于三个值application/x-www-form-urlencoded、multipart/form-data、text/plain)-->
|
|
||||||
<add name="Access-Control-Allow-Headers" value="*"/>
|
|
||||||
<!--允许跨域访问的网址-->
|
|
||||||
<add name="Access-Control-Allow-Origin" value="*"/>
|
|
||||||
<!--<add name="Access-Control-Allow-Origin" value="http://www.yabyy.com,http://bbs.yabyy.com"/>-->
|
|
||||||
</customHeaders>
|
|
||||||
</httpProtocol>
|
|
||||||
<modules>
|
<modules>
|
||||||
<remove name="FormsAuthentication" />
|
<remove name="FormsAuthentication" />
|
||||||
<remove name="ApplicationInsightsWebTracking" />
|
<remove name="ApplicationInsightsWebTracking" />
|
||||||
@ -176,7 +162,20 @@
|
|||||||
<loggerToMatch value="System_Log" />
|
<loggerToMatch value="System_Log" />
|
||||||
</filter>
|
</filter>
|
||||||
<filter type="log4net.Filter.DenyAllFilter" />
|
<filter type="log4net.Filter.DenyAllFilter" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</appender>
|
</appender>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<appender name="SystemLogAppender_LightUp" type="log4net.Appender.RollingFileAppender">
|
<appender name="SystemLogAppender_LightUp" type="log4net.Appender.RollingFileAppender">
|
||||||
<file value="Log/System_Log/" />
|
<file value="Log/System_Log/" />
|
||||||
<appendToFile value="true" />
|
<appendToFile value="true" />
|
||||||
|
Reference in New Issue
Block a user