This commit is contained in:
103
Common/AgvHelper.cs
Normal file
103
Common/AgvHelper.cs
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.Common
|
||||||
|
{
|
||||||
|
public class AgvHelper
|
||||||
|
{
|
||||||
|
HttpHelper http = new HttpHelper();
|
||||||
|
#region 生成任务单
|
||||||
|
public AgvResultModel genAgvSchedulingTask(AgvReqModel model)
|
||||||
|
{
|
||||||
|
string url = string.Empty;
|
||||||
|
AgvResultModel resmodel = new AgvResultModel();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
string postData = JsonHelper.SerializeObject(model);
|
||||||
|
LogHelper.WriteLogInfo("调用AGV生成任务单接口请求参数" + postData, LogHelper.Log_Type.INFO);
|
||||||
|
string res = http.HttpPost_Old(url, postData);
|
||||||
|
LogHelper.WriteLogInfo("调用AGV生成任务单接口返回" + res, LogHelper.Log_Type.INFO);
|
||||||
|
if (!string.IsNullOrEmpty(res))
|
||||||
|
{
|
||||||
|
resmodel = JsonHelper.DeserializeObject<AgvResultModel>(res);
|
||||||
|
if (resmodel.code == "0")
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("调用AGV生成任务单接口返回成功", LogHelper.Log_Type.INFO);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
LogHelper.WriteLogInfo("调用AGV生成任务单接口返回失败" + resmodel.message, LogHelper.Log_Type.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("调用AGV生成任务单接口返回失败", LogHelper.Log_Type.ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resmodel;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
resmodel.code = "-1";
|
||||||
|
resmodel.message = ex.ToString();
|
||||||
|
LogHelper.WriteLogInfo("调用AGV生成任务单接口异常" + ex.ToString(), LogHelper.Log_Type.ERROR);
|
||||||
|
return resmodel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 取消任务
|
||||||
|
|
||||||
|
public AgvResultModel cancelTask(cancelTaskModel model)
|
||||||
|
{
|
||||||
|
string url = string.Empty;
|
||||||
|
AgvResultModel resmodel = new AgvResultModel();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
string postData = JsonHelper.SerializeObject(model);
|
||||||
|
LogHelper.WriteLogInfo("调用AGV取消任务接口请求参数" + postData, LogHelper.Log_Type.INFO);
|
||||||
|
string res = http.HttpPost_Old(url, postData);
|
||||||
|
LogHelper.WriteLogInfo("调用AGV取消任务接口返回" + res, LogHelper.Log_Type.INFO);
|
||||||
|
if (!string.IsNullOrEmpty(res))
|
||||||
|
{
|
||||||
|
resmodel = JsonHelper.DeserializeObject<AgvResultModel>(res);
|
||||||
|
if (resmodel.code == "0")
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("调用AGV取消任务接口返回成功", LogHelper.Log_Type.INFO);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
LogHelper.WriteLogInfo("调用AGV取消任务接口返回失败" + resmodel.message, LogHelper.Log_Type.ERROR);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("调用AGV取消任务接口返回失败", LogHelper.Log_Type.ERROR);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resmodel;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
resmodel.code = "-1";
|
||||||
|
resmodel.message = ex.ToString();
|
||||||
|
LogHelper.WriteLogInfo("调用AGV取消任务接口异常" + ex.ToString(), LogHelper.Log_Type.ERROR);
|
||||||
|
return resmodel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -106,6 +106,7 @@
|
|||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<Compile Include="AgvHelper.cs" />
|
||||||
<Compile Include="CacheHelper.cs" />
|
<Compile Include="CacheHelper.cs" />
|
||||||
<Compile Include="ConfigurationOperator.cs" />
|
<Compile Include="ConfigurationOperator.cs" />
|
||||||
<Compile Include="ConvertHexHelper.cs" />
|
<Compile Include="ConvertHexHelper.cs" />
|
||||||
|
@ -99,12 +99,14 @@
|
|||||||
<Compile Include="EntityBase.cs" />
|
<Compile Include="EntityBase.cs" />
|
||||||
<Compile Include="ErrorLogBLL.cs" />
|
<Compile Include="ErrorLogBLL.cs" />
|
||||||
<Compile Include="HistoryXmlBLL.cs" />
|
<Compile Include="HistoryXmlBLL.cs" />
|
||||||
|
<Compile Include="InboundOrdersBLL.cs" />
|
||||||
<Compile Include="Light.cs" />
|
<Compile Include="Light.cs" />
|
||||||
<Compile Include="LogXmlBLL.cs" />
|
<Compile Include="LogXmlBLL.cs" />
|
||||||
<Compile Include="MenuInfoBLL.cs" />
|
<Compile Include="MenuInfoBLL.cs" />
|
||||||
<Compile Include="ModelConvertHelper.cs" />
|
<Compile Include="ModelConvertHelper.cs" />
|
||||||
<Compile Include="OrderBLL.cs" />
|
<Compile Include="OrderBLL.cs" />
|
||||||
<Compile Include="OrderControlBLL.cs" />
|
<Compile Include="OrderControlBLL.cs" />
|
||||||
|
<Compile Include="PalletinfoBLL.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="RoleInfoBLL.cs" />
|
<Compile Include="RoleInfoBLL.cs" />
|
||||||
<Compile Include="ShopBLL.cs" />
|
<Compile Include="ShopBLL.cs" />
|
||||||
@ -112,6 +114,7 @@
|
|||||||
<Compile Include="StorageLocationBLL.cs" />
|
<Compile Include="StorageLocationBLL.cs" />
|
||||||
<Compile Include="OrdersQueueBLL.cs" />
|
<Compile Include="OrdersQueueBLL.cs" />
|
||||||
<Compile Include="StoreBLL.cs" />
|
<Compile Include="StoreBLL.cs" />
|
||||||
|
<Compile Include="Sys_operate_logBLL.cs" />
|
||||||
<Compile Include="UserBLL.cs" />
|
<Compile Include="UserBLL.cs" />
|
||||||
<Compile Include="WmsBLL.cs" />
|
<Compile Include="WmsBLL.cs" />
|
||||||
<Compile Include="WmsTaskBLL.cs" />
|
<Compile Include="WmsTaskBLL.cs" />
|
||||||
|
47
Epost.BLL/InboundOrdersBLL.cs
Normal file
47
Epost.BLL/InboundOrdersBLL.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Epost.DAL;
|
||||||
|
using Epost.Model;
|
||||||
|
namespace Epost.BLL
|
||||||
|
{
|
||||||
|
public class InboundOrdersBLL
|
||||||
|
{
|
||||||
|
InboundOrdersDAL dal = new InboundOrdersDAL();
|
||||||
|
|
||||||
|
#region 分页获取订单表列表
|
||||||
|
/// <summary>
|
||||||
|
/// 分页获取数据列表
|
||||||
|
/// </summary>
|
||||||
|
public List<InboundOrdersModel> GetOrdersListByPage(string strWhere, string orderby, int pageSize, int pageIndex, out int recordCount)
|
||||||
|
{
|
||||||
|
int startIndex = 0;
|
||||||
|
int endIndex = 0;
|
||||||
|
if (pageIndex <= 0)
|
||||||
|
pageIndex = 1;
|
||||||
|
//计算查询的开始行数与结束行数
|
||||||
|
startIndex = (pageIndex - 1) * pageSize + 1;
|
||||||
|
endIndex = pageIndex * pageSize;
|
||||||
|
return dal.GetOrdersListByPage(strWhere, orderby, startIndex, endIndex, out recordCount);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 查询订单是否已存在
|
||||||
|
public DataTable GetOrdersList(string wmsDocNo)
|
||||||
|
{
|
||||||
|
return dal.GetOrdersList(wmsDocNo);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 添加订单
|
||||||
|
public bool InsertOrder(DataTable dt, Dictionary<string, string> diclist)
|
||||||
|
{
|
||||||
|
return dal.InsertOrders(dt, diclist);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
@ -73,19 +73,18 @@ namespace Epost.BLL
|
|||||||
{
|
{
|
||||||
OrisShow = true;
|
OrisShow = true;
|
||||||
workbll.UpdateWorkModel(WorkEcommendType.Create);
|
workbll.UpdateWorkModel(WorkEcommendType.Create);
|
||||||
//【多少个大区多少个线程】
|
////【多少个大区多少个线程】
|
||||||
List<AddressstorageModel> Arealist = addrBLL.GetshelfidList();
|
//List<AddressstorageModel> Arealist = addrBLL.GetshelfidList();
|
||||||
if (Arealist.Any())
|
//if (Arealist.Any())
|
||||||
{
|
//{
|
||||||
Work_JobDownThread downthread = new Work_JobDownThread();
|
Work_JobDownThread downthread = new Work_JobDownThread();
|
||||||
downthread.tblock = "01|01";
|
downthread.tblock = "01|01";
|
||||||
Work_DisplayJobThread jobthread = new Work_DisplayJobThread();
|
Work_DisplayJobThread jobthread = new Work_DisplayJobThread();
|
||||||
jobthread.tblock = "01|01";
|
jobthread.tblock = "01|01";
|
||||||
Work_ScanThread scantherad = new Work_ScanThread();
|
|
||||||
scantherad.tblock = "01|01";
|
//foreach (AddressstorageModel item in Arealist)
|
||||||
foreach (AddressstorageModel item in Arealist)
|
//{
|
||||||
{
|
string block = "01|01";
|
||||||
string block = item.block + "|" + item.shelfid;
|
|
||||||
jobthread = new Work_DisplayJobThread();
|
jobthread = new Work_DisplayJobThread();
|
||||||
jobthread.id = block;
|
jobthread.id = block;
|
||||||
jobthread.tblock = block;
|
jobthread.tblock = block;
|
||||||
@ -101,14 +100,9 @@ namespace Epost.BLL
|
|||||||
Thread thread = new Thread(new ThreadStart(downthread.Work));
|
Thread thread = new Thread(new ThreadStart(downthread.Work));
|
||||||
thread.Start();
|
thread.Start();
|
||||||
|
|
||||||
scantherad = new Work_ScanThread();
|
|
||||||
scantherad.id = block;
|
// }
|
||||||
scantherad.tblock = block;
|
// }
|
||||||
scantherad.OrisShow = OrisShow;
|
|
||||||
Thread scanthread = new Thread(new ThreadStart(scantherad.ScanList));
|
|
||||||
scanthread.Start();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
40
Epost.BLL/PalletinfoBLL.cs
Normal file
40
Epost.BLL/PalletinfoBLL.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
using Epost.DAL;
|
||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.BLL
|
||||||
|
{
|
||||||
|
public class PalletinfoBLL
|
||||||
|
{
|
||||||
|
|
||||||
|
PalletinfoDAL dal = new PalletinfoDAL();
|
||||||
|
#region 分页获取订单表列表
|
||||||
|
/// <summary>
|
||||||
|
/// 分页获取数据列表
|
||||||
|
/// </summary>
|
||||||
|
public List<PalletinfoModel> GetPalletListByPage(string strWhere, string orderby, int pageSize, int pageIndex, out int recordCount)
|
||||||
|
{
|
||||||
|
int startIndex = 0;
|
||||||
|
int endIndex = 0;
|
||||||
|
if (pageIndex <= 0)
|
||||||
|
pageIndex = 1;
|
||||||
|
//计算查询的开始行数与结束行数
|
||||||
|
startIndex = (pageIndex - 1) * pageSize + 1;
|
||||||
|
endIndex = pageIndex * pageSize;
|
||||||
|
return dal.GetPalletListByPage(strWhere, orderby, startIndex, endIndex, out recordCount);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 添加订单
|
||||||
|
public bool InsertPallet(DataTable dt, Dictionary<string, string> diclist)
|
||||||
|
{
|
||||||
|
return dal.InsertPallet(dt, diclist);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
62
Epost.BLL/Sys_operate_logBLL.cs
Normal file
62
Epost.BLL/Sys_operate_logBLL.cs
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
using Epost.DAL;
|
||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.BLL
|
||||||
|
{
|
||||||
|
public class Sys_operate_logBLL
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
Sys_operate_logDAL dal = new Sys_operate_logDAL();
|
||||||
|
|
||||||
|
#region 分页获取订单表列表
|
||||||
|
/// <summary>
|
||||||
|
/// 分页获取数据列表
|
||||||
|
/// </summary>
|
||||||
|
public List<Sys_operate_logModel> GetLogListByPage(string strWhere, string orderby, int pageSize, int pageIndex, out int recordCount)
|
||||||
|
{
|
||||||
|
int startIndex = 0;
|
||||||
|
int endIndex = 0;
|
||||||
|
if (pageIndex <= 0)
|
||||||
|
pageIndex = 1;
|
||||||
|
//计算查询的开始行数与结束行数
|
||||||
|
startIndex = (pageIndex - 1) * pageSize + 1;
|
||||||
|
endIndex = pageIndex * pageSize;
|
||||||
|
return dal.GetLogListByPage(strWhere, orderby, startIndex, endIndex, out recordCount);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取日志列表
|
||||||
|
public List<Sys_operate_logModel> GetLogDetail(int mid)
|
||||||
|
{
|
||||||
|
return dal.GetLogDetail(mid);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#region 添加日志
|
||||||
|
public bool InsertLog(string title, string method, string operate_url, string operate_param, string json_result, int status, string error_msg, DateTime addtime)
|
||||||
|
{
|
||||||
|
Sys_operate_logModel logmodel = new Sys_operate_logModel();
|
||||||
|
logmodel.title = title;
|
||||||
|
logmodel.method = method;
|
||||||
|
logmodel.operate_url = operate_url;
|
||||||
|
logmodel.operate_param = operate_param;
|
||||||
|
logmodel.json_result = json_result;
|
||||||
|
logmodel.status = status;
|
||||||
|
logmodel.error_msg = error_msg;
|
||||||
|
logmodel.addtime = addtime;
|
||||||
|
return dal.InsertLogDetail(logmodel);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -4,6 +4,7 @@ using Epost.DAL.Enum;
|
|||||||
using Epost.Model;
|
using Epost.Model;
|
||||||
using Epost.Model.resource;
|
using Epost.Model.resource;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
@ -78,46 +79,17 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string[] nlist = tblock.Split('|');
|
|
||||||
string nblock = nlist[0];
|
|
||||||
string shelfid = nlist[1];
|
|
||||||
List<AddressstorageModel> Arealist = addrBLL.GetAreaList(nblock, shelfid);
|
|
||||||
foreach (AddressstorageModel item in Arealist)
|
|
||||||
{
|
|
||||||
OrdersQueueModel model = new OrdersQueueModel(); ;
|
|
||||||
model.Taskarea = item.area;
|
|
||||||
model.Taskblock = nblock;
|
|
||||||
#region 开始作业
|
#region 开始作业
|
||||||
DataTable queueDT = queueBLL.getQueueOrderState(model);
|
//查询是否有空闲的agv
|
||||||
if (queueDT != null && queueDT.Rows.Count > 0)
|
//查询待执行的任务
|
||||||
{
|
//更新任务状态为执行中
|
||||||
//当前区没有作业
|
|
||||||
if (queueDT.Rows[0]["state"].ToString() == "0")
|
|
||||||
{
|
|
||||||
#region 点亮显示器
|
|
||||||
ShowMessageModel_M showmodel = new ShowMessageModel_M();
|
|
||||||
showmodel.Area = shelfid;
|
|
||||||
showmodel.Block = nblock;
|
|
||||||
showmodel.Color = queueDT.Rows[0]["lightcolor"].ToString();//EnumHelper.EMToDescriptionString(LightColor.Color.Red);
|
|
||||||
showmodel.Contents = queueDT.Rows[0]["sku"].ToString();
|
|
||||||
showmodel.Title = queueDT.Rows[0]["Shopid"].ToString();
|
|
||||||
showmodel.Islock = true;
|
|
||||||
|
|
||||||
showmodel.IsTwinkle = 0;
|
|
||||||
showmodel.Type = 8;
|
|
||||||
DataTable sudt = orderbll.GetSumList("", queueDT.Rows[0]["sku"].ToString(), nblock);
|
|
||||||
if (sudt != null && sudt.Rows.Count > 0)
|
|
||||||
{
|
|
||||||
showmodel.Qty = sudt.Rows[0]["SumQuantity"].ToString();
|
|
||||||
}
|
|
||||||
comBLL.ShowBoxMessage_M(showmodel);//点亮显示标签
|
|
||||||
#endregion
|
|
||||||
displayOrder(queueDT, nblock, item.area, model);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
@ -131,114 +103,6 @@ namespace Epost.BLL
|
|||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 点亮设备
|
|
||||||
public void displayOrder(DataTable queueDT, string nblock, string narea, OrdersQueueModel model)
|
|
||||||
{
|
|
||||||
List<LabelParamModel> list = new List<LabelParamModel>();
|
|
||||||
model.Id = Convert.ToInt32(queueDT.Rows[0]["id"].ToString());
|
|
||||||
#region 点亮任务
|
|
||||||
List<JobModel> jobList = JobCache.GetPlanJobList();
|
|
||||||
List<JobModel> isJobList = jobList.FindAll(p => p.Block == nblock && p.Area == narea && p.State != 3);
|
|
||||||
ShowMessageModel showmodel = new ShowMessageModel();
|
|
||||||
//获取当前区任务并加入缓存
|
|
||||||
if (!isJobList.Any())
|
|
||||||
{
|
|
||||||
model.State = 1;
|
|
||||||
orderbll.GetOrderList(queueDT.Rows[0]["matchid"].ToString(), nblock, queueDT.Rows[0]["sku"].ToString(), narea, queueDT.Rows[0]["usercode"].ToString());
|
|
||||||
List<JobModel> nowJoblist = jobList.FindAll(p => p.State == 0 && p.Block == model.Taskblock && p.Area == model.Taskarea);
|
|
||||||
if (nowJoblist.Any())
|
|
||||||
{
|
|
||||||
var nowmodel = nowJoblist.FirstOrDefault();
|
|
||||||
|
|
||||||
LogHelper.WriteLogInfo("进入任务点亮=====matchid=" + nowmodel.Matchid + "===orderid===" + nowmodel.OrderID + "=====sku==" + nowmodel.Sku + "========");
|
|
||||||
#region 点亮任务标签
|
|
||||||
foreach (JobModel item in nowJoblist.ToArray())
|
|
||||||
{
|
|
||||||
|
|
||||||
#region 回显设备锁定
|
|
||||||
if (queueDT.Rows[0]["lightcolor"].ToString() == EnumHelper.EMToDescriptionString(LightColor.Color.Blue))
|
|
||||||
{
|
|
||||||
|
|
||||||
LabelParamModel locklamodel = new LabelParamModel();
|
|
||||||
locklamodel.Address = item.Address.ToString();
|
|
||||||
locklamodel.ControlIP = item.ControlIP.ToString();
|
|
||||||
locklamodel.Command = "LOCK";
|
|
||||||
locklamodel.Parameter = "11111000";
|
|
||||||
locklamodel.Type = "N";
|
|
||||||
list.Add(locklamodel);
|
|
||||||
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
// else
|
|
||||||
//{
|
|
||||||
|
|
||||||
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
|
|
||||||
lamodel.Type = "N";
|
|
||||||
lamodel.Quantity = quantity.ToString();
|
|
||||||
lamodel.Uid = "U" + 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)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo("添加到点亮的list————————:" + list.Count);
|
|
||||||
comBLL.DISPLAY_JOBALL(list);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{//无任务
|
|
||||||
LogHelper.WriteLogInfo("点亮====无任务=======================");
|
|
||||||
model.State = 3;
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
if (jobList.Any())
|
|
||||||
{
|
|
||||||
|
|
||||||
var finishList = jobList.FindAll(p => p.State == 0);
|
|
||||||
if (!finishList.Any())
|
|
||||||
{
|
|
||||||
queueBLL.UpdateQueueOrderState(model);//缓存队列状态修改
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
LogHelper.WriteLogInfo("还有未完成任务" + isJobList.Count);
|
|
||||||
foreach (JobModel item in isJobList)
|
|
||||||
{
|
|
||||||
LogHelper.WriteLogInfo("还有未完成任务" + item.Address + item.ID);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -127,9 +127,11 @@
|
|||||||
<Compile Include="Enum\SqlLogType.cs" />
|
<Compile Include="Enum\SqlLogType.cs" />
|
||||||
<Compile Include="ErrorLogDAL.cs" />
|
<Compile Include="ErrorLogDAL.cs" />
|
||||||
<Compile Include="HistoryDataDAL.cs" />
|
<Compile Include="HistoryDataDAL.cs" />
|
||||||
|
<Compile Include="InboundOrdersDAL.cs" />
|
||||||
<Compile Include="MenuInfoDAL.cs" />
|
<Compile Include="MenuInfoDAL.cs" />
|
||||||
<Compile Include="OrcaleDB.cs" />
|
<Compile Include="OrcaleDB.cs" />
|
||||||
<Compile Include="OrdersDAL.cs" />
|
<Compile Include="OrdersDAL.cs" />
|
||||||
|
<Compile Include="PalletinfoDAL.cs" />
|
||||||
<Compile Include="PressureTestDAL.cs" />
|
<Compile Include="PressureTestDAL.cs" />
|
||||||
<Compile Include="Properties\Class1.cs" />
|
<Compile Include="Properties\Class1.cs" />
|
||||||
<Compile Include="ControlDAL.cs" />
|
<Compile Include="ControlDAL.cs" />
|
||||||
@ -140,6 +142,7 @@
|
|||||||
<Compile Include="RoleInfoDAL.cs" />
|
<Compile Include="RoleInfoDAL.cs" />
|
||||||
<Compile Include="SkuInfoDAL.cs" />
|
<Compile Include="SkuInfoDAL.cs" />
|
||||||
<Compile Include="StoreDAL.cs" />
|
<Compile Include="StoreDAL.cs" />
|
||||||
|
<Compile Include="Sys_operate_logDAL.cs" />
|
||||||
<Compile Include="UserDAL.cs" />
|
<Compile Include="UserDAL.cs" />
|
||||||
<Compile Include="WmsDAL.cs" />
|
<Compile Include="WmsDAL.cs" />
|
||||||
<Compile Include="WmsDB.cs" />
|
<Compile Include="WmsDB.cs" />
|
||||||
|
83
Epost.DAL/InboundOrdersDAL.cs
Normal file
83
Epost.DAL/InboundOrdersDAL.cs
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
using Epost.Common;
|
||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.DAL
|
||||||
|
{
|
||||||
|
|
||||||
|
public class InboundOrdersDAL
|
||||||
|
{
|
||||||
|
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||||
|
#region 分页获取订单表列表
|
||||||
|
|
||||||
|
public List<InboundOrdersModel> GetOrdersListByPage(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 id desc");
|
||||||
|
}
|
||||||
|
strSql.Append(")AS Row, T.* from inboundorders T WITH(NOLOCK) ");
|
||||||
|
if (!string.IsNullOrEmpty(strWhere.Trim()))
|
||||||
|
{
|
||||||
|
strSql.Append(" WHERE 1=1 " + strWhere);
|
||||||
|
}
|
||||||
|
strSql.Append(" ) TT");
|
||||||
|
strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
|
||||||
|
List<InboundOrdersModel> list = ModelConvertHelper<InboundOrdersModel>.ConvertToList(db.GetsqlForDT(strSql.ToString()));
|
||||||
|
|
||||||
|
strSql.Remove(0, strSql.Length);
|
||||||
|
strSql.Append("SELECT COUNT(*) FROM inboundorders AS T ");
|
||||||
|
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<InboundOrdersModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
#region 查询订单是否已存在
|
||||||
|
public DataTable GetOrdersList(string wmsDocNo)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select top 1 * from InboundOrders where wmsDocNo = '{0}'",
|
||||||
|
wmsDocNo);
|
||||||
|
return db.GetsqlForDT(sql);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 添加订单
|
||||||
|
public bool InsertOrders(DataTable dt, Dictionary<string, string> diclist)
|
||||||
|
{
|
||||||
|
return db.UpdateData(dt, "InboundOrders", diclist);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
76
Epost.DAL/PalletinfoDAL.cs
Normal file
76
Epost.DAL/PalletinfoDAL.cs
Normal file
@ -0,0 +1,76 @@
|
|||||||
|
using Epost.Common;
|
||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.DAL
|
||||||
|
{
|
||||||
|
public class PalletinfoDAL
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||||
|
#region 分页获取订单表列表
|
||||||
|
|
||||||
|
public List<PalletinfoModel> GetPalletListByPage(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 id desc");
|
||||||
|
}
|
||||||
|
strSql.Append(")AS Row, T.* from Palletinfo T WITH(NOLOCK) ");
|
||||||
|
if (!string.IsNullOrEmpty(strWhere.Trim()))
|
||||||
|
{
|
||||||
|
strSql.Append(" WHERE 1=1 " + strWhere);
|
||||||
|
}
|
||||||
|
strSql.Append(" ) TT");
|
||||||
|
strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
|
||||||
|
List<PalletinfoModel> list = ModelConvertHelper<PalletinfoModel>.ConvertToList(db.GetsqlForDT(strSql.ToString()));
|
||||||
|
|
||||||
|
strSql.Remove(0, strSql.Length);
|
||||||
|
strSql.Append("SELECT COUNT(*) FROM Palletinfo AS T ");
|
||||||
|
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<PalletinfoModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 添加订单
|
||||||
|
public bool InsertPallet(DataTable dt, Dictionary<string, string> diclist)
|
||||||
|
{
|
||||||
|
return db.UpdateData(dt, "Palletinfo", diclist);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
104
Epost.DAL/Sys_operate_logDAL.cs
Normal file
104
Epost.DAL/Sys_operate_logDAL.cs
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
using Epost.Common;
|
||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.DAL
|
||||||
|
{
|
||||||
|
public class Sys_operate_logDAL
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
DataBaseOpration.OprationSqlDAL db = DB_DLL.GetInstance();
|
||||||
|
#region 分页获取日志列表
|
||||||
|
|
||||||
|
public List<Sys_operate_logModel> GetLogListByPage(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 id desc");
|
||||||
|
}
|
||||||
|
strSql.Append(")AS Row, T.* from Sys_operate_log T WITH(NOLOCK) ");
|
||||||
|
if (!string.IsNullOrEmpty(strWhere.Trim()))
|
||||||
|
{
|
||||||
|
strSql.Append(" WHERE 1=1 " + strWhere);
|
||||||
|
}
|
||||||
|
strSql.Append(" ) TT");
|
||||||
|
strSql.AppendFormat(" WHERE TT.Row between {0} and {1}", startIndex, endIndex);
|
||||||
|
List<Sys_operate_logModel> list = ModelConvertHelper<Sys_operate_logModel>.ConvertToList(db.GetsqlForDT(strSql.ToString()));
|
||||||
|
|
||||||
|
strSql.Remove(0, strSql.Length);
|
||||||
|
strSql.Append("SELECT COUNT(*) FROM Sys_operate_log AS T ");
|
||||||
|
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<Sys_operate_logModel>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取日志明细
|
||||||
|
|
||||||
|
public List<Sys_operate_logModel> GetLogDetail(int mid)
|
||||||
|
{
|
||||||
|
string sql = string.Format("select * from Sys_operate_log where ID='" + mid + "'");
|
||||||
|
DataTable dt = db.GetsqlForDT(sql);
|
||||||
|
return ModelConvertHelper<Sys_operate_logModel>.ConvertToList(dt);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 添加日志
|
||||||
|
public bool InsertLogDetail(Sys_operate_logModel model)
|
||||||
|
{
|
||||||
|
string sql = string.Format("insert into Sys_operate_log([title],[method],[operate_url],[operate_param],[json_result],[status],[error_msg],[addtime]) " +
|
||||||
|
"values('{0}','{1}','{2}','{3}','{4}','{5}','{6}','{7}' )",
|
||||||
|
model.title, model.method, model.operate_url, model.operate_param, model.json_result, model.status, model.error_msg, model.addtime);
|
||||||
|
long x = db.UpdateSql(sql);
|
||||||
|
|
||||||
|
if (x > 0)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("添加日志失败" + sql);
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
104
Epost.Model/AgvReqModel.cs
Normal file
104
Epost.Model/AgvReqModel.cs
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.Model
|
||||||
|
{
|
||||||
|
public class AgvReqModel
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 生成任务单
|
||||||
|
public class AgvSchedulingTaskModel
|
||||||
|
{
|
||||||
|
public string reqCode { get; set; }
|
||||||
|
public string reqTime { get; set; }
|
||||||
|
public string clientCode { get; set; }
|
||||||
|
public string tokenCode { get; set; }
|
||||||
|
public string taskTyp { get; set; }
|
||||||
|
public string ctnrTyp { get; set; }
|
||||||
|
public string ctnrCode { get; set; }
|
||||||
|
public string ctnrNum { get; set; }
|
||||||
|
public string taskMode { get; set; }
|
||||||
|
public string wbCode { get; set; }
|
||||||
|
public List<Positioncodepath> positionCodePath { get; set; }
|
||||||
|
public string podCode { get; set; }
|
||||||
|
public string podDir { get; set; }
|
||||||
|
public string podTyp { get; set; }
|
||||||
|
public string materialLot { get; set; }
|
||||||
|
public string materialType { get; set; }
|
||||||
|
public string priority { get; set; }
|
||||||
|
public string agvCode { get; set; }
|
||||||
|
public string taskCode { get; set; }
|
||||||
|
public string groupId { get; set; }
|
||||||
|
public string agvTyp { get; set; }
|
||||||
|
public string positionSelStrategy { get; set; }
|
||||||
|
public string data { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Positioncodepath
|
||||||
|
{
|
||||||
|
public string positionCode { get; set; }
|
||||||
|
public string type { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class AgvResultModel
|
||||||
|
{
|
||||||
|
public string code { get; set; }
|
||||||
|
public string data { get; set; }
|
||||||
|
public string message { get; set; }
|
||||||
|
public string reqCode { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 取消任务
|
||||||
|
|
||||||
|
public class cancelTaskModel
|
||||||
|
{
|
||||||
|
public string reqCode { get; set; }
|
||||||
|
public string reqTime { get; set; }
|
||||||
|
public string clientCode { get; set; }
|
||||||
|
public string tokenCode { get; set; }
|
||||||
|
public string forceCancel { get; set; }
|
||||||
|
public string matterArea { get; set; }
|
||||||
|
public string agvCode { get; set; }
|
||||||
|
public string taskCode { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 任务执行通知
|
||||||
|
|
||||||
|
public class agvCallbackModel
|
||||||
|
{
|
||||||
|
public string reqCode { get; set; }
|
||||||
|
public string reqTime { get; set; }
|
||||||
|
public string cooX { get; set; }
|
||||||
|
public string cooY { get; set; }
|
||||||
|
public string currentPositionCode { get; set; }
|
||||||
|
public string data { get; set; }
|
||||||
|
public string mapCode { get; set; }
|
||||||
|
public string mapDataCode { get; set; }
|
||||||
|
public string stgBinCode { get; set; }
|
||||||
|
public string method { get; set; }
|
||||||
|
public string podCode { get; set; }
|
||||||
|
public string podDir { get; set; }
|
||||||
|
public string robotCode { get; set; }
|
||||||
|
public string taskCode { get; set; }
|
||||||
|
public string wbCode { get; set; }
|
||||||
|
public string materialLot { get; set; }
|
||||||
|
public string materialType { get; set; }
|
||||||
|
public string ctnrCode { get; set; }
|
||||||
|
public string ctnrType { get; set; }
|
||||||
|
public string roadWayCode { get; set; }
|
||||||
|
public string seq { get; set; }
|
||||||
|
public string eqpCode { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
@ -84,6 +84,7 @@
|
|||||||
<Compile Include="Addresssage\AddressList.cs" />
|
<Compile Include="Addresssage\AddressList.cs" />
|
||||||
<Compile Include="AddressstorageModel.cs" />
|
<Compile Include="AddressstorageModel.cs" />
|
||||||
<Compile Include="AddressViewModel.cs" />
|
<Compile Include="AddressViewModel.cs" />
|
||||||
|
<Compile Include="AgvReqModel.cs" />
|
||||||
<Compile Include="Base.cs" />
|
<Compile Include="Base.cs" />
|
||||||
<Compile Include="BoxModel.cs" />
|
<Compile Include="BoxModel.cs" />
|
||||||
<Compile Include="BoxPickModel.cs" />
|
<Compile Include="BoxPickModel.cs" />
|
||||||
@ -97,6 +98,7 @@
|
|||||||
<Compile Include="ErrorLogModel.cs" />
|
<Compile Include="ErrorLogModel.cs" />
|
||||||
<Compile Include="ErrorLogViewModel.cs" />
|
<Compile Include="ErrorLogViewModel.cs" />
|
||||||
<Compile Include="HistoryDataModel.cs" />
|
<Compile Include="HistoryDataModel.cs" />
|
||||||
|
<Compile Include="InboundOrdersModel.cs" />
|
||||||
<Compile Include="JobModel.cs" />
|
<Compile Include="JobModel.cs" />
|
||||||
<Compile Include="LabelModel.cs" />
|
<Compile Include="LabelModel.cs" />
|
||||||
<Compile Include="LabelParamModel.cs" />
|
<Compile Include="LabelParamModel.cs" />
|
||||||
@ -114,6 +116,7 @@
|
|||||||
<Compile Include="OrderRepModel.cs" />
|
<Compile Include="OrderRepModel.cs" />
|
||||||
<Compile Include="OrderReportModel.cs" />
|
<Compile Include="OrderReportModel.cs" />
|
||||||
<Compile Include="OrdersModel.cs" />
|
<Compile Include="OrdersModel.cs" />
|
||||||
|
<Compile Include="PalletinfoModel.cs" />
|
||||||
<Compile Include="ParameterModel.cs" />
|
<Compile Include="ParameterModel.cs" />
|
||||||
<Compile Include="PressureTestModel.cs" />
|
<Compile Include="PressureTestModel.cs" />
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
@ -132,6 +135,8 @@
|
|||||||
<Compile Include="OrdersQueueModel.cs" />
|
<Compile Include="OrdersQueueModel.cs" />
|
||||||
<Compile Include="ShowMessageModel_M.cs" />
|
<Compile Include="ShowMessageModel_M.cs" />
|
||||||
<Compile Include="StoreModel.cs" />
|
<Compile Include="StoreModel.cs" />
|
||||||
|
<Compile Include="Sys_operate_logModel.cs" />
|
||||||
|
<Compile Include="TaskModel.cs" />
|
||||||
<Compile Include="UserCodeModel.cs" />
|
<Compile Include="UserCodeModel.cs" />
|
||||||
<Compile Include="UserLoginModel.cs" />
|
<Compile Include="UserLoginModel.cs" />
|
||||||
<Compile Include="UserModel.cs" />
|
<Compile Include="UserModel.cs" />
|
||||||
|
44
Epost.Model/InboundOrdersModel.cs
Normal file
44
Epost.Model/InboundOrdersModel.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.Model
|
||||||
|
{
|
||||||
|
public class InboundOrdersModel : Base
|
||||||
|
{
|
||||||
|
int _id = 0;
|
||||||
|
string _wmsDocNo = string.Empty;
|
||||||
|
string _groupTaskId = string.Empty;
|
||||||
|
string _palletId = string.Empty;
|
||||||
|
string _spositionCode = string.Empty;
|
||||||
|
string _dpositionCode = string.Empty;
|
||||||
|
string _priority = string.Empty;
|
||||||
|
string _taskType = string.Empty;
|
||||||
|
string _userId = string.Empty;
|
||||||
|
string _userName = string.Empty;
|
||||||
|
string _notes = string.Empty;
|
||||||
|
string _warehouseId = string.Empty;
|
||||||
|
int _state;
|
||||||
|
private Nullable<DateTime> _addtime;
|
||||||
|
private Nullable<DateTime> _endtime;
|
||||||
|
private Nullable<DateTime> _operationtime;
|
||||||
|
public int id { get => _id; set => _id = value; }
|
||||||
|
public string wmsDocNo { get => _wmsDocNo; set => _wmsDocNo = value; }
|
||||||
|
public string groupTaskId { get => _groupTaskId; set => _groupTaskId = value; }
|
||||||
|
public string palletId { get => _palletId; set => _palletId = value; }
|
||||||
|
public string spositionCode { get => _spositionCode; set => _spositionCode = value; }
|
||||||
|
public string dpositionCode { get => _dpositionCode; set => _dpositionCode = value; }
|
||||||
|
public string priority { get => _priority; set => _priority = value; }
|
||||||
|
public string taskType { get => _taskType; set => _taskType = value; }
|
||||||
|
public string userId { get => _userId; set => _userId = value; }
|
||||||
|
public string userName { get => _userName; set => _userName = value; }
|
||||||
|
public string notes { get => _notes; set => _notes = value; }
|
||||||
|
public string warehouseId { get => _warehouseId; set => _warehouseId = value; }
|
||||||
|
public int state { get => _state; set => _state = value; }
|
||||||
|
public DateTime? addtime { get => _addtime; set => _addtime = value; }
|
||||||
|
public DateTime? endtime { get => _endtime; set => _endtime = value; }
|
||||||
|
public DateTime? operationtime { get => _operationtime; set => _operationtime = value; }
|
||||||
|
}
|
||||||
|
}
|
44
Epost.Model/PalletinfoModel.cs
Normal file
44
Epost.Model/PalletinfoModel.cs
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.Model
|
||||||
|
{
|
||||||
|
public class PalletinfoModel : Base
|
||||||
|
{
|
||||||
|
int _id = 0;
|
||||||
|
string _wmsDocNo = string.Empty;
|
||||||
|
string _groupTaskId = string.Empty;
|
||||||
|
string _palletId = string.Empty;
|
||||||
|
string _sku = string.Empty;
|
||||||
|
string _skuDescr1 = string.Empty;
|
||||||
|
string _qty = string.Empty;
|
||||||
|
string _lotatt01 = string.Empty;
|
||||||
|
string _lotatt02 = string.Empty;
|
||||||
|
string _lotatt04 = string.Empty;
|
||||||
|
string _lotatt07 = string.Empty;
|
||||||
|
string _lotatt08 = string.Empty;
|
||||||
|
string _notes = string.Empty;
|
||||||
|
string _taskType = string.Empty;
|
||||||
|
private Nullable<DateTime> _addtime;
|
||||||
|
private Nullable<DateTime> _endtime;
|
||||||
|
public int id { get => _id; set => _id = value; }
|
||||||
|
public string wmsDocNo { get => _wmsDocNo; set => _wmsDocNo = value; }
|
||||||
|
public string groupTaskId { get => _groupTaskId; set => _groupTaskId = value; }
|
||||||
|
public string palletId { get => _palletId; set => _palletId = value; }
|
||||||
|
public string sku { get => _sku; set => _sku = value; }
|
||||||
|
public string skuDescr1 { get => _skuDescr1; set => _skuDescr1 = value; }
|
||||||
|
public string qty { get => _qty; set => _qty = value; }
|
||||||
|
public string lotatt01 { get => _lotatt01; set => _lotatt01 = value; }
|
||||||
|
public string lotatt02 { get => _lotatt02; set => _lotatt02 = value; }
|
||||||
|
public string lotatt04 { get => _lotatt04; set => _lotatt04 = value; }
|
||||||
|
public string lotatt07 { get => _lotatt07; set => _lotatt07 = value; }
|
||||||
|
public string lotatt08 { get => _lotatt08; set => _lotatt08 = value; }
|
||||||
|
public string notes { get => _notes; set => _notes = value; }
|
||||||
|
public string taskType { get => _taskType; set => _taskType = value; }
|
||||||
|
public DateTime? addtime { get => _addtime; set => _addtime = value; }
|
||||||
|
public DateTime? endtime { get => _endtime; set => _endtime = value; }
|
||||||
|
}
|
||||||
|
}
|
33
Epost.Model/Sys_operate_logModel.cs
Normal file
33
Epost.Model/Sys_operate_logModel.cs
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.Model
|
||||||
|
{
|
||||||
|
public class Sys_operate_logModel : Base
|
||||||
|
{
|
||||||
|
private int _id = 0;
|
||||||
|
private string _title = string.Empty;
|
||||||
|
private string _method = string.Empty;
|
||||||
|
private string _operate_url = string.Empty;
|
||||||
|
private string _operate_param = string.Empty;
|
||||||
|
private string _json_result = string.Empty;
|
||||||
|
private int _status = 0;
|
||||||
|
private string _error_msg = string.Empty;
|
||||||
|
|
||||||
|
private Nullable<DateTime> _addtime;
|
||||||
|
private Nullable<DateTime> _endtime;
|
||||||
|
public int id { get => _id; set => _id = value; }
|
||||||
|
public string title { get => _title; set => _title = value; }
|
||||||
|
public string method { get => _method; set => _method = value; }
|
||||||
|
public string operate_url { get => _operate_url; set => _operate_url = value; }
|
||||||
|
public string operate_param { get => _operate_param; set => _operate_param = value; }
|
||||||
|
public string json_result { get => _json_result; set => _json_result = value; }
|
||||||
|
public int status { get => _status; set => _status = value; }
|
||||||
|
public string error_msg { get => _error_msg; set => _error_msg = value; }
|
||||||
|
public DateTime? addtime { get => _addtime; set => _addtime = value; }
|
||||||
|
public DateTime? endtime { get => _endtime; set => _endtime = value; }
|
||||||
|
}
|
||||||
|
}
|
96
Epost.Model/TaskModel.cs
Normal file
96
Epost.Model/TaskModel.cs
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Epost.Model
|
||||||
|
{
|
||||||
|
|
||||||
|
public class TaskModel
|
||||||
|
{
|
||||||
|
public TaskData data { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TaskData
|
||||||
|
{
|
||||||
|
public List<TaskHeader> header { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TaskHeader
|
||||||
|
{
|
||||||
|
public string warehouseId { get; set; }
|
||||||
|
public string wmsDocNo { get; set; }
|
||||||
|
public string priority { get; set; }
|
||||||
|
public string taskType { get; set; }
|
||||||
|
public string userId { get; set; }
|
||||||
|
public string userName { get; set; }
|
||||||
|
public string notes { get; set; }
|
||||||
|
public string udf01 { get; set; }
|
||||||
|
public string udf02 { get; set; }
|
||||||
|
public string udf03 { get; set; }
|
||||||
|
public string udf04 { get; set; }
|
||||||
|
public string udf05 { get; set; }
|
||||||
|
public string udf06 { get; set; }
|
||||||
|
public List<TaskDetail> details { get; set; }
|
||||||
|
public List<TaskDetails2> details2 { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TaskDetail
|
||||||
|
{
|
||||||
|
public string groupTaskId { get; set; }
|
||||||
|
public string palletId { get; set; }
|
||||||
|
public string spositionCode { get; set; }
|
||||||
|
public string dpositionCode { get; set; }
|
||||||
|
public string notes { get; set; }
|
||||||
|
public string udf01 { get; set; }
|
||||||
|
public string udf02 { get; set; }
|
||||||
|
public string udf03 { get; set; }
|
||||||
|
public string udf04 { get; set; }
|
||||||
|
public string udf05 { get; set; }
|
||||||
|
public string udf06 { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class TaskDetails2
|
||||||
|
{
|
||||||
|
public string groupTaskId { get; set; }
|
||||||
|
public string palletId { get; set; }
|
||||||
|
public string sku { get; set; }
|
||||||
|
public string skuDescr1 { get; set; }
|
||||||
|
public string qty { get; set; }
|
||||||
|
public string lotatt01 { get; set; }
|
||||||
|
public string lotatt02 { get; set; }
|
||||||
|
public string lotatt04 { get; set; }
|
||||||
|
public string lotatt07 { get; set; }
|
||||||
|
public string lotatt08 { get; set; }
|
||||||
|
public string notes { get; set; }
|
||||||
|
public string udf01 { get; set; }
|
||||||
|
public string udf02 { get; set; }
|
||||||
|
public string udf03 { get; set; }
|
||||||
|
public string udf04 { get; set; }
|
||||||
|
public string udf05 { get; set; }
|
||||||
|
public string udf06 { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region 接口返回
|
||||||
|
|
||||||
|
public class RetMesModel
|
||||||
|
{
|
||||||
|
public ResponseModel Response { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ResponseModel
|
||||||
|
{
|
||||||
|
public ReturnRes _return { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ReturnRes
|
||||||
|
{
|
||||||
|
public string returnCode { get; set; }
|
||||||
|
public string returnDesc { get; set; }
|
||||||
|
public string returnFlag { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
}
|
47
Epost.TestToolsWeb/Controllers/AgvTaskApiController.cs
Normal file
47
Epost.TestToolsWeb/Controllers/AgvTaskApiController.cs
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
using Epost.Common;
|
||||||
|
using Epost.DAL.Cache;
|
||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Web.Helpers;
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
|
namespace Epost.DPS.Controllers
|
||||||
|
{
|
||||||
|
[RoutePrefix("api/AgvTaskApi")]
|
||||||
|
public class AgvTaskApiController : ApiController
|
||||||
|
{
|
||||||
|
JobDownCacheDAL JobCache = new JobDownCacheDAL();
|
||||||
|
[Route("agvCallback")]
|
||||||
|
[HttpPost]
|
||||||
|
public AgvResultModel agvCallback([FromBody] agvCallbackModel model)
|
||||||
|
{
|
||||||
|
AgvResultModel retModel = new AgvResultModel();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("请求报文" + JsonHelper.SerializeObject(model));
|
||||||
|
|
||||||
|
ResultMessageModel data = new ResultMessageModel();
|
||||||
|
data.Parameter = model.reqCode;
|
||||||
|
data.Status = model.method;
|
||||||
|
data.Address = model.taskCode;
|
||||||
|
JobCache.UpdateJobDownModelList(new List<ResultMessageModel>() { data }, EdownCommend.Create);
|
||||||
|
retModel.message = "成功!";
|
||||||
|
retModel.code = "0";
|
||||||
|
retModel.reqCode = model.reqCode;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("agvPutTask异常:" + ex.ToString(), LogHelper.Log_Type.ERROR);
|
||||||
|
retModel.message = "请求接口异常!";
|
||||||
|
retModel.code = "-1";
|
||||||
|
retModel.reqCode = model.reqCode;
|
||||||
|
}
|
||||||
|
return retModel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
215
Epost.TestToolsWeb/Controllers/TaskAPIController.cs
Normal file
215
Epost.TestToolsWeb/Controllers/TaskAPIController.cs
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
using Epost.BLL;
|
||||||
|
using Epost.Common;
|
||||||
|
using Epost.Model;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Net;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Web.Http;
|
||||||
|
|
||||||
|
namespace Epost.DPS.Controllers
|
||||||
|
{
|
||||||
|
[RoutePrefix("api/TaskAPI")]
|
||||||
|
public class TaskAPIController : ApiController
|
||||||
|
{
|
||||||
|
InboundOrdersBLL inOrderBLL = new InboundOrdersBLL();
|
||||||
|
PalletinfoBLL palletBLL = new PalletinfoBLL();
|
||||||
|
Sys_operate_logBLL logBLL = new Sys_operate_logBLL();
|
||||||
|
[Route("agvPutTask")]
|
||||||
|
[HttpPost]
|
||||||
|
public RetMesModel agvPutTask([FromBody] TaskModel model)
|
||||||
|
{
|
||||||
|
RetMesModel retModel = new RetMesModel();
|
||||||
|
ResponseModel respModel = new ResponseModel();
|
||||||
|
ReturnRes res = new ReturnRes();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("请求报文" + JsonHelper.SerializeObject(model));
|
||||||
|
|
||||||
|
if (model.data.header.Any())
|
||||||
|
{
|
||||||
|
foreach (TaskHeader item in model.data.header)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(item.wmsDocNo) || string.IsNullOrEmpty(item.taskType))
|
||||||
|
{
|
||||||
|
res.returnDesc = "请求参数错误!";
|
||||||
|
res.returnCode = "0001";
|
||||||
|
res.returnFlag = "0";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
DataTable orderdt = inOrderBLL.GetOrdersList(item.wmsDocNo);
|
||||||
|
if (orderdt != null && orderdt.Rows.Count > 0)
|
||||||
|
{
|
||||||
|
res.returnDesc = "订单已存在!";
|
||||||
|
res.returnCode = "0001";
|
||||||
|
res.returnFlag = "0";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
#region datatable创建
|
||||||
|
DataTable dataTable = new DataTable();
|
||||||
|
dataTable.TableName = "InboundOrders";
|
||||||
|
dataTable.Columns.Add(new DataColumn("wmsDocNo", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("groupTaskId", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("palletId", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("spositionCode", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("dpositionCode", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("priority", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("taskType", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("userId", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("userName", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("notes", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("warehouseId", typeof(string)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("addtime", typeof(DateTime)));
|
||||||
|
dataTable.Columns.Add(new DataColumn("state", typeof(int)));
|
||||||
|
#endregion
|
||||||
|
if (item.details.Any())
|
||||||
|
{
|
||||||
|
foreach (TaskDetail detail in item.details)
|
||||||
|
{
|
||||||
|
#region datatable
|
||||||
|
DataRow dataRow = dataTable.NewRow();
|
||||||
|
dataRow["wmsDocNo"] = item.wmsDocNo;
|
||||||
|
dataRow["groupTaskId"] = detail.groupTaskId;
|
||||||
|
dataRow["palletId"] = detail.palletId;
|
||||||
|
dataRow["spositionCode"] = detail.spositionCode;
|
||||||
|
dataRow["dpositionCode"] = detail.dpositionCode;
|
||||||
|
dataRow["priority"] = item.priority;
|
||||||
|
dataRow["taskType"] = item.taskType;
|
||||||
|
dataRow["userId"] = item.userId;
|
||||||
|
dataRow["userName"] = item.userName;
|
||||||
|
dataRow["notes"] = detail.notes;
|
||||||
|
dataRow["warehouseId"] = item.warehouseId;
|
||||||
|
dataRow["addtime"] = DateTime.Now.ToString();
|
||||||
|
dataRow["state"] = "0";
|
||||||
|
dataTable.Rows.Add(dataRow);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#region Dictionary
|
||||||
|
Dictionary<string, string> diclist = new Dictionary<string, string>();
|
||||||
|
diclist.Add("wmsDocNo", "wmsDocNo");
|
||||||
|
diclist.Add("groupTaskId", "groupTaskId");
|
||||||
|
diclist.Add("palletId", "palletId");
|
||||||
|
diclist.Add("spositionCode", "spositionCode");
|
||||||
|
diclist.Add("dpositionCode", "dpositionCode");
|
||||||
|
diclist.Add("priority", "priority");
|
||||||
|
diclist.Add("taskType", "taskType");
|
||||||
|
diclist.Add("userId", "userId");
|
||||||
|
diclist.Add("userName", "userName");
|
||||||
|
diclist.Add("notes", "notes");
|
||||||
|
diclist.Add("warehouseId", "warehouseId");
|
||||||
|
diclist.Add("addtime", "addtime");
|
||||||
|
diclist.Add("state", "state");
|
||||||
|
#endregion
|
||||||
|
bool bo = inOrderBLL.InsertOrder(dataTable, diclist);
|
||||||
|
if (bo)
|
||||||
|
{
|
||||||
|
//添加托盘明细
|
||||||
|
InsertPallet(item);
|
||||||
|
res.returnCode = "0000";
|
||||||
|
res.returnDesc = "成功!";
|
||||||
|
res.returnFlag = "1";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
res.returnCode = "0001";
|
||||||
|
res.returnDesc = "请求失败,请重试!";
|
||||||
|
res.returnFlag = "0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("agvPutTask异常:" + ex.ToString(), LogHelper.Log_Type.ERROR);
|
||||||
|
res.returnDesc = "请求接口异常!";
|
||||||
|
res.returnCode = "0001";
|
||||||
|
res.returnFlag = "0";
|
||||||
|
}
|
||||||
|
respModel._return = res;
|
||||||
|
retModel.Response = respModel;
|
||||||
|
logBLL.InsertLog("生成任务单", "agvPutTask", "/api/TaskAPI/agvPutTask", JsonHelper.SerializeObject(model), JsonHelper.SerializeObject(retModel), 0, res.returnDesc, DateTime.Now);
|
||||||
|
return retModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
#region 添加托盘明细
|
||||||
|
public bool InsertPallet(TaskHeader item)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
#region datatable创建
|
||||||
|
DataTable dataTable2 = new DataTable();
|
||||||
|
dataTable2.TableName = "Palletinfo";
|
||||||
|
dataTable2.Columns.Add(new DataColumn("wmsDocNo", typeof(string)));
|
||||||
|
dataTable2.Columns.Add(new DataColumn("groupTaskId", typeof(string)));
|
||||||
|
dataTable2.Columns.Add(new DataColumn("palletId", typeof(string)));
|
||||||
|
dataTable2.Columns.Add(new DataColumn("sku", typeof(string)));
|
||||||
|
dataTable2.Columns.Add(new DataColumn("skuDescr1", typeof(string)));
|
||||||
|
dataTable2.Columns.Add(new DataColumn("qty", typeof(string)));
|
||||||
|
dataTable2.Columns.Add(new DataColumn("taskType", typeof(string)));
|
||||||
|
dataTable2.Columns.Add(new DataColumn("notes", typeof(string)));
|
||||||
|
dataTable2.Columns.Add(new DataColumn("addtime", typeof(DateTime)));
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
if (item.details2.Any())
|
||||||
|
{
|
||||||
|
foreach (TaskDetails2 detail in item.details2)
|
||||||
|
{
|
||||||
|
#region datatable
|
||||||
|
DataRow dataRow1 = dataTable2.NewRow();
|
||||||
|
dataRow1["wmsDocNo"] = item.wmsDocNo;
|
||||||
|
dataRow1["groupTaskId"] = detail.groupTaskId;
|
||||||
|
dataRow1["palletId"] = detail.palletId;
|
||||||
|
dataRow1["sku"] = detail.sku;
|
||||||
|
dataRow1["skuDescr1"] = detail.skuDescr1;
|
||||||
|
dataRow1["qty"] = detail.qty;
|
||||||
|
dataRow1["notes"] = item.notes;
|
||||||
|
dataRow1["taskType"] = item.taskType;
|
||||||
|
dataRow1["addtime"] = DateTime.Now.ToString();
|
||||||
|
|
||||||
|
dataTable2.Rows.Add(dataRow1);
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#region Dictionary
|
||||||
|
Dictionary<string, string> diclist1 = new Dictionary<string, string>();
|
||||||
|
diclist1.Add("wmsDocNo", "wmsDocNo");
|
||||||
|
diclist1.Add("groupTaskId", "groupTaskId");
|
||||||
|
diclist1.Add("palletId", "palletId");
|
||||||
|
diclist1.Add("sku", "sku");
|
||||||
|
diclist1.Add("skuDescr1", "skuDescr1");
|
||||||
|
diclist1.Add("qty", "qty");
|
||||||
|
diclist1.Add("notes", "notes");
|
||||||
|
diclist1.Add("taskType", "taskType");
|
||||||
|
diclist1.Add("addtime", "addtime");
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
bool bo = palletBLL.InsertPallet(dataTable2, diclist1);
|
||||||
|
LogHelper.WriteLogInfo(item.wmsDocNo + "添加托盘明细:" + bo);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
LogHelper.WriteLogInfo("添加托盘明细异常:" + ex.ToString(), LogHelper.Log_Type.ERROR);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -222,8 +222,10 @@
|
|||||||
<Compile Include="App_Start\RouteConfig.cs" />
|
<Compile Include="App_Start\RouteConfig.cs" />
|
||||||
<Compile Include="App_Start\Startup.Auth.cs" />
|
<Compile Include="App_Start\Startup.Auth.cs" />
|
||||||
<Compile Include="App_Start\WebApiConfig.cs" />
|
<Compile Include="App_Start\WebApiConfig.cs" />
|
||||||
|
<Compile Include="Controllers\AgvTaskApiController.cs" />
|
||||||
<Compile Include="Controllers\HomeController.cs" />
|
<Compile Include="Controllers\HomeController.cs" />
|
||||||
<Compile Include="Controllers\ServerController.cs" />
|
<Compile Include="Controllers\ServerController.cs" />
|
||||||
|
<Compile Include="Controllers\TaskAPIController.cs" />
|
||||||
<Compile Include="Controllers\WebAPIController.cs" />
|
<Compile Include="Controllers\WebAPIController.cs" />
|
||||||
<Compile Include="Global.asax.cs">
|
<Compile Include="Global.asax.cs">
|
||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<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>E:\WORK\代码管理\T系列\播种\Epost.TestToolsWeb\Properties\PublishProfiles\Toolsweb.pubxml</NameOfLastUsedPublishProfile>
|
||||||
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
|
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
|
||||||
<Use64BitIISExpress />
|
<Use64BitIISExpress />
|
||||||
<IISExpressSSLPort />
|
<IISExpressSSLPort />
|
||||||
<IISExpressAnonymousAuthentication />
|
<IISExpressAnonymousAuthentication />
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<IISExpressUseClassicPipelineMode />
|
<IISExpressUseClassicPipelineMode />
|
||||||
<UseGlobalApplicationHostFile />
|
<UseGlobalApplicationHostFile />
|
||||||
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||||
<Controller_SelectedScaffolderCategoryPath>root/Controller</Controller_SelectedScaffolderCategoryPath>
|
<Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ProjectExtensions>
|
<ProjectExtensions>
|
||||||
<VisualStudio>
|
<VisualStudio>
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
<SiteUrlToLaunchAfterPublish />
|
<SiteUrlToLaunchAfterPublish />
|
||||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||||
<publishUrl>D:\驿传\Wuxidingshi_DAS</publishUrl>
|
<publishUrl>D:\驿传\zhuyou_wcs</publishUrl>
|
||||||
<DeleteExistingFiles>true</DeleteExistingFiles>
|
<DeleteExistingFiles>true</DeleteExistingFiles>
|
||||||
<PrecompileBeforePublish>true</PrecompileBeforePublish>
|
<PrecompileBeforePublish>true</PrecompileBeforePublish>
|
||||||
<EnableUpdateable>true</EnableUpdateable>
|
<EnableUpdateable>true</EnableUpdateable>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||||
<_PublishTargetUrl>D:\驿传\Wuxidingshi_DAS</_PublishTargetUrl>
|
<_PublishTargetUrl>D:\驿传\zhuyou_wcs</_PublishTargetUrl>
|
||||||
<History>False|2024-11-04T09:48:25.2781696Z;True|2024-11-01T16:04:56.3535724+08:00;True|2024-09-01T10:13:37.1598955+08:00;True|2024-08-31T17:27:57.5375469+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History>
|
<History>True|2024-11-22T06:00:39.7806019Z;False|2024-11-04T17:48:25.2781696+08:00;True|2024-11-01T16:04:56.3535724+08:00;True|2024-09-01T10:13:37.1598955+08:00;True|2024-08-31T17:27:57.5375469+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History>
|
||||||
<LastFailureDetails />
|
<LastFailureDetails />
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
@ -33,19 +33,19 @@
|
|||||||
<publishTime>04/04/2018 15:45:12</publishTime>
|
<publishTime>04/04/2018 15:45:12</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/App_global.asax.compiled">
|
<File Include="bin/App_global.asax.compiled">
|
||||||
<publishTime>11/08/2024 11:47:18</publishTime>
|
<publishTime>11/22/2024 14:00:36</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/App_global.asax.dll">
|
<File Include="bin/App_global.asax.dll">
|
||||||
<publishTime>11/08/2024 11:47:17</publishTime>
|
<publishTime>11/22/2024 14:00:36</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/BouncyCastle.Crypto.dll">
|
<File Include="bin/BouncyCastle.Crypto.dll">
|
||||||
<publishTime>02/24/2020 15:29:24</publishTime>
|
<publishTime>02/24/2020 15:29:24</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Common.dll">
|
<File Include="bin/Common.dll">
|
||||||
<publishTime>11/06/2024 10:26:56</publishTime>
|
<publishTime>11/22/2024 14:00:20</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Common.pdb">
|
<File Include="bin/Common.pdb">
|
||||||
<publishTime>11/06/2024 10:26:56</publishTime>
|
<publishTime>11/22/2024 14:00:20</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/ComposerSDK.dll">
|
<File Include="bin/ComposerSDK.dll">
|
||||||
<publishTime>04/29/2020 16:50:14</publishTime>
|
<publishTime>04/29/2020 16:50:14</publishTime>
|
||||||
@ -63,31 +63,31 @@
|
|||||||
<publishTime>10/23/2017 13:15:20</publishTime>
|
<publishTime>10/23/2017 13:15:20</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.BLL.dll">
|
<File Include="bin/Epost.BLL.dll">
|
||||||
<publishTime>11/08/2024 11:47:07</publishTime>
|
<publishTime>11/22/2024 14:00:21</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.BLL.pdb">
|
<File Include="bin/Epost.BLL.pdb">
|
||||||
<publishTime>11/08/2024 11:47:07</publishTime>
|
<publishTime>11/22/2024 14:00:21</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.BLL.XmlSerializers.dll">
|
<File Include="bin/Epost.BLL.XmlSerializers.dll">
|
||||||
<publishTime>08/26/2020 18:09:48</publishTime>
|
<publishTime>08/26/2020 18:09:48</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DAL.dll">
|
<File Include="bin/Epost.DAL.dll">
|
||||||
<publishTime>11/08/2024 11:47:06</publishTime>
|
<publishTime>11/22/2024 14:00:20</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DAL.pdb">
|
<File Include="bin/Epost.DAL.pdb">
|
||||||
<publishTime>11/08/2024 11:47:06</publishTime>
|
<publishTime>11/22/2024 14:00:20</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DPS.dll">
|
<File Include="bin/Epost.DPS.dll">
|
||||||
<publishTime>11/08/2024 11:47:09</publishTime>
|
<publishTime>11/22/2024 14:00:23</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.DPS.pdb">
|
<File Include="bin/Epost.DPS.pdb">
|
||||||
<publishTime>11/08/2024 11:47:09</publishTime>
|
<publishTime>11/22/2024 14:00:23</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.Model.dll">
|
<File Include="bin/Epost.Model.dll">
|
||||||
<publishTime>11/06/2024 10:26:56</publishTime>
|
<publishTime>11/22/2024 14:00:20</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.Model.pdb">
|
<File Include="bin/Epost.Model.pdb">
|
||||||
<publishTime>11/06/2024 10:26:56</publishTime>
|
<publishTime>11/22/2024 14:00:20</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="bin/Epost.TestToolsWeb.dll">
|
<File Include="bin/Epost.TestToolsWeb.dll">
|
||||||
<publishTime>09/06/2018 11:57:11</publishTime>
|
<publishTime>09/06/2018 11:57:11</publishTime>
|
||||||
@ -5652,7 +5652,7 @@
|
|||||||
<publishTime>05/30/2022 16:58:47</publishTime>
|
<publishTime>05/30/2022 16:58:47</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="PrecompiledApp.config">
|
<File Include="PrecompiledApp.config">
|
||||||
<publishTime>11/08/2024 11:47:11</publishTime>
|
<publishTime>11/22/2024 14:00:24</publishTime>
|
||||||
</File>
|
</File>
|
||||||
<File Include="Scripts/ai.0.22.9-build00167.js">
|
<File Include="Scripts/ai.0.22.9-build00167.js">
|
||||||
<publishTime>04/04/2018 15:45:12</publishTime>
|
<publishTime>04/04/2018 15:45:12</publishTime>
|
||||||
|
Reference in New Issue
Block a user