This commit is contained in:
jl
2024-12-02 13:53:56 +08:00
parent fb0c29fb89
commit 7bdb8633db
7 changed files with 106 additions and 59 deletions

View File

@ -44,6 +44,28 @@ namespace Epost.BLL
return dal.GetInOrderList(strwhere); return dal.GetInOrderList(strwhere);
} }
#endregion #endregion
#region
public DataTable GetV_InOrders(string strwhere)
{
return dal.GetV_InOrders(strwhere);
}
#endregion
#region
public string GetLocation(string strwhere)
{
DataTable dt= dal.GetLocation(strwhere);
if (dt != null && dt.Rows.Count > 0)
{
return dt.Rows[0]["agvloc"].ToString();
}
else {
return "";
}
}
#endregion
#region #region
public bool InsertOrder(DataTable dt, Dictionary<string, string> diclist) public bool InsertOrder(DataTable dt, Dictionary<string, string> diclist)
{ {
@ -57,8 +79,16 @@ namespace Epost.BLL
return dal.UpInOrderList(id,state,data); return dal.UpInOrderList(id,state,data);
} }
public bool UpInOrder(string id, string errormsg)
{
return dal.UpInOrder(id, errormsg);
}
#endregion #endregion
#region agv单号更新订单状态 #region agv单号更新订单状态
public bool UpInOrderListByAgvid(string agvid, string state) public bool UpInOrderListByAgvid(string agvid, string state)
{ {

View File

@ -88,13 +88,27 @@ namespace Epost.DAL
} }
#endregion #endregion
#region
public DataTable GetV_InOrders(string strwhere)
{
string sql = string.Format("select * from v_InboundOrders where 1=1 " + strwhere);
return db.GetsqlForDT(sql);
}
#endregion
#region
public DataTable GetLocation(string strwhere)
{
string sql = string.Format("select * from locationInfo where 1=1 " + strwhere);
return db.GetsqlForDT(sql);
}
#endregion
#region #region
public bool UpInOrderList(string id,string state,string data) public bool UpInOrderList(string id,string state,string data)
{ {
string upstr = string.Empty; string upstr = string.Empty;
if (!string.IsNullOrEmpty(data)) if (!string.IsNullOrEmpty(data))
{ {
upstr = ",agvid='"+data+"'"; upstr = ",agvmsg='',agvid='" + data+"'";
} }
string sql = string.Format("update InboundOrders set state ='{0}'"+ upstr + " where id ='{1}'", string sql = string.Format("update InboundOrders set state ='{0}'"+ upstr + " where id ='{1}'",
state,id); state,id);
@ -105,6 +119,19 @@ namespace Epost.DAL
} }
#endregion #endregion
#region
public bool UpInOrder(string id,string errormsg)
{
string sql = string.Format("update InboundOrders set agvmsg='{0}' where id ='{1}'",
errormsg, id);
long x = db.UpdateSql(sql);
if (x > 0)
return true;
return false;
}
#endregion
#region agv单号更新订单状态 #region agv单号更新订单状态
public bool UpInOrderListByAgvid(string agvid, string state) public bool UpInOrderListByAgvid(string agvid, string state)
{ {

View File

@ -82,7 +82,7 @@ namespace Epost.Model
public class ResponseModel public class ResponseModel
{ {
public ReturnRes _return { get; set; } public ReturnRes returnnode { get; set; }
} }
public class ReturnRes public class ReturnRes

View File

@ -19,9 +19,10 @@ namespace Epost.DPS.Controllers
Sys_operate_logBLL logBLL = new Sys_operate_logBLL(); Sys_operate_logBLL logBLL = new Sys_operate_logBLL();
[Route("agvPutTask")] [Route("agvPutTask")]
[HttpPost] [HttpPost]
public string agvPutTask([FromBody] TaskModel model) public RetMesModel agvPutTask([FromBody] TaskModel model)
{ {
RetMesModel retMes = new RetMesModel();
ResponseModel response = new ResponseModel();
ReturnRes res = new ReturnRes(); ReturnRes res = new ReturnRes();
try try
{ {
@ -135,9 +136,11 @@ namespace Epost.DPS.Controllers
res.returnCode = "0001"; res.returnCode = "0001";
res.returnFlag = "0"; res.returnFlag = "0";
} }
string resinfo = "{\"Response\":{\"return\":" + JsonHelper.SerializeObject(res) + " } }"; response.returnnode = res;
retMes.Response = response;
string resinfo = JsonHelper.SerializeObject(retMes) ;
logBLL.InsertLog("生成任务单", "agvPutTask", "/api/TaskAPI/agvPutTask", JsonHelper.SerializeObject(model), resinfo, 0, res.returnDesc, DateTime.Now); logBLL.InsertLog("生成任务单", "agvPutTask", "/api/TaskAPI/agvPutTask", JsonHelper.SerializeObject(model), resinfo, 0, res.returnDesc, DateTime.Now);
return resinfo; return retMes;
} }
#region #region
@ -209,9 +212,10 @@ namespace Epost.DPS.Controllers
[Route("agvCancleTask")] [Route("agvCancleTask")]
[HttpPost] [HttpPost]
public string agvCancleTask([FromBody]AgvCancleModel model) public RetMesModel agvCancleTask([FromBody]AgvCancleModel model)
{ {
RetMesModel retMes = new RetMesModel();
ResponseModel response = new ResponseModel();
ReturnRes res = new ReturnRes(); ReturnRes res = new ReturnRes();
try try
{ {
@ -261,18 +265,21 @@ namespace Epost.DPS.Controllers
res.returnCode = "0001"; res.returnCode = "0001";
res.returnFlag = "0"; res.returnFlag = "0";
} }
string resinfo = "{\"Response\":{\"return\":" + JsonHelper.SerializeObject(res) + " } }"; response.returnnode = res;
retMes.Response = response;
string resinfo = JsonHelper.SerializeObject(retMes) ;
logBLL.InsertLog("取消任务接口", "agvCancleTask", "/api/TaskAPI/agvCancleTask", JsonHelper.SerializeObject(model), resinfo, 0, res.returnDesc, DateTime.Now); logBLL.InsertLog("取消任务接口", "agvCancleTask", "/api/TaskAPI/agvCancleTask", JsonHelper.SerializeObject(model), resinfo, 0, res.returnDesc, DateTime.Now);
return resinfo; return retMes;
} }
[Route("agvBindPodAndBerth")] [Route("agvBindPodAndBerth")]
[HttpPost] [HttpPost]
public string agvBindPodAndBerth([FromBody] agvBindPodModel model) public RetMesModel agvBindPodAndBerth([FromBody] agvBindPodModel model)
{ {
RetMesModel retMes = new RetMesModel();
ResponseModel response = new ResponseModel();
ReturnRes res = new ReturnRes(); ReturnRes res = new ReturnRes();
try try
{ {
@ -311,10 +318,12 @@ namespace Epost.DPS.Controllers
res.returnCode = "0001"; res.returnCode = "0001";
res.returnFlag = "0"; res.returnFlag = "0";
} }
string resinfo = "{\"Response\":{\"return\":" + JsonHelper.SerializeObject(res) + " } }"; response.returnnode = res;
retMes.Response = response;
string resinfo = JsonHelper.SerializeObject(retMes);
logBLL.InsertLog("agv绑定解绑接口", "agvBindPodAndBerth", "/api/TaskAPI/agvBindPodAndBerth", JsonHelper.SerializeObject(model), resinfo, 0, res.returnDesc, DateTime.Now); logBLL.InsertLog("agv绑定解绑接口", "agvBindPodAndBerth", "/api/TaskAPI/agvBindPodAndBerth", JsonHelper.SerializeObject(model), resinfo, 0, res.returnDesc, DateTime.Now);
return resinfo; return retMes;
} }
} }
} }

View File

@ -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 />
@ -21,29 +21,5 @@
<Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID> <Controller_SelectedScaffolderID>ApiControllerEmptyScaffolder</Controller_SelectedScaffolderID>
<Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath> <Controller_SelectedScaffolderCategoryPath>root/Common/Web API</Controller_SelectedScaffolderCategoryPath>
</PropertyGroup> </PropertyGroup>
<ProjectExtensions> <ProjectExtensions />
<VisualStudio>
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
<WebProjectProperties>
<StartPageUrl>
</StartPageUrl>
<StartAction>CurrentPage</StartAction>
<AspNetDebugging>True</AspNetDebugging>
<SilverlightDebugging>False</SilverlightDebugging>
<NativeDebugging>False</NativeDebugging>
<SQLDebugging>False</SQLDebugging>
<ExternalProgram>
</ExternalProgram>
<StartExternalURL>
</StartExternalURL>
<StartCmdLineArguments>
</StartCmdLineArguments>
<StartWorkingDirectory>
</StartWorkingDirectory>
<EnableENC>True</EnableENC>
<AlwaysStartWebServerOnDebug>False</AlwaysStartWebServerOnDebug>
</WebProjectProperties>
</FlavorProperties>
</VisualStudio>
</ProjectExtensions>
</Project> </Project>

View File

@ -22,6 +22,7 @@ namespace Epost.TestToolsWeb
public class MvcApplication : System.Web.HttpApplication public class MvcApplication : System.Web.HttpApplication
{ {
InboundOrdersBLL inboundBLL = new InboundOrdersBLL(); InboundOrdersBLL inboundBLL = new InboundOrdersBLL();
protected void Application_Start() protected void Application_Start()
{ {
AreaRegistration.RegisterAllAreas(); AreaRegistration.RegisterAllAreas();
@ -47,11 +48,11 @@ namespace Epost.TestToolsWeb
reqmodel.reqCode =DateTime.Now.Month+DateTime.Now.Day+ row["id"].ToString();; reqmodel.reqCode =DateTime.Now.Month+DateTime.Now.Day+ row["id"].ToString();;
List<Positioncodepath> positionList = new List<Positioncodepath>(); List<Positioncodepath> positionList = new List<Positioncodepath>();
Positioncodepath pathModel = new Positioncodepath(); Positioncodepath pathModel = new Positioncodepath();
pathModel.positionCode = row["spositionCode"].ToString(); pathModel.positionCode = inboundBLL.GetLocation(" and wmsloc ='"+ row["spositionCode"].ToString() + "'");
pathModel.type = "05";//agv提供 pathModel.type = "05";//agv提供
positionList.Add(pathModel); positionList.Add(pathModel);
Positioncodepath pathModel2 = new Positioncodepath(); Positioncodepath pathModel2 = new Positioncodepath();
pathModel2.positionCode = row["dpositionCode"].ToString(); pathModel2.positionCode = inboundBLL.GetLocation(" and wmsloc = '"+ row["dpositionCode"].ToString() + "'");
pathModel2.type = "05"; pathModel2.type = "05";
positionList.Add(pathModel2); positionList.Add(pathModel2);
reqmodel.positionCodePath = positionList; reqmodel.positionCodePath = positionList;
@ -61,7 +62,11 @@ namespace Epost.TestToolsWeb
if (res.code == "0") if (res.code == "0")
{ {
//调用agv成功 更新订单状态 //调用agv成功 更新订单状态
inboundBLL.UpInOrderList(row["id"].ToString(),"1",res.data); inboundBLL.UpInOrderList(row["id"].ToString(), "1", res.data);
}
else if (res.code == "1")
{
inboundBLL.UpInOrder(row["id"].ToString(),"AGV告警"+res.message);
} }
} }
} }

View File

@ -7,7 +7,7 @@
<PropertyGroup> <PropertyGroup>
<TimeStampOfAssociatedLegacyPublishXmlFile /> <TimeStampOfAssociatedLegacyPublishXmlFile />
<_PublishTargetUrl>D:\驿传\zhuyou_wcs</_PublishTargetUrl> <_PublishTargetUrl>D:\驿传\zhuyou_wcs</_PublishTargetUrl>
<History>True|2024-11-26T02:08:16.7734518Z;True|2024-11-22T14:00:39.7806019+08:00;False|2024-11-04T17:48:25.2781696+08:00;True|2024-11-01T16:04:56.3535724+08:00;True|2024-09-01T10:13:37.1598955+08:00;True|2024-08-31T17:27:57.5375469+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History> <History>True|2024-11-29T07:21:54.3789957Z;True|2024-11-29T14:43:30.2764537+08:00;True|2024-11-29T14:05:34.1608373+08:00;True|2024-11-29T13:24:48.7549546+08:00;True|2024-11-29T11:33:32.4546950+08:00;True|2024-11-26T10:08:16.7734518+08:00;True|2024-11-22T14:00:39.7806019+08:00;False|2024-11-04T17:48:25.2781696+08:00;True|2024-11-01T16:04:56.3535724+08:00;True|2024-09-01T10:13:37.1598955+08:00;True|2024-08-31T17:27:57.5375469+08:00;True|2022-07-15T16:41:13.9750291+08:00;True|2022-07-14T14:02:20.7983427+08:00;True|2022-07-13T17:40:22.7531000+08:00;True|2022-07-13T17:34:22.9908701+08:00;True|2022-07-13T17:30:06.3588502+08:00;True|2022-07-11T10:32:06.9053981+08:00;True|2021-04-26T10:07:37.4889549+08:00;True|2021-04-09T10:32:51.9130162+08:00;True|2021-04-09T10:31:50.4974012+08:00;</History>
<LastFailureDetails /> <LastFailureDetails />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -33,19 +33,19 @@
<publishTime>04/04/2018 15:45:12</publishTime> <publishTime>04/04/2018 15:45:12</publishTime>
</File> </File>
<File Include="bin/App_global.asax.compiled"> <File Include="bin/App_global.asax.compiled">
<publishTime>11/26/2024 17:03:14</publishTime> <publishTime>11/29/2024 15:21:52</publishTime>
</File> </File>
<File Include="bin/App_global.asax.dll"> <File Include="bin/App_global.asax.dll">
<publishTime>11/26/2024 17:03:14</publishTime> <publishTime>11/29/2024 15:21:51</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/26/2024 10:21:58</publishTime> <publishTime>11/29/2024 11:24:21</publishTime>
</File> </File>
<File Include="bin/Common.pdb"> <File Include="bin/Common.pdb">
<publishTime>11/26/2024 10:21:58</publishTime> <publishTime>11/29/2024 11:24:21</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/26/2024 10:21:58</publishTime> <publishTime>11/29/2024 15:21:40</publishTime>
</File> </File>
<File Include="bin/Epost.BLL.pdb"> <File Include="bin/Epost.BLL.pdb">
<publishTime>11/26/2024 10:21:58</publishTime> <publishTime>11/29/2024 15:21:40</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/26/2024 10:21:58</publishTime> <publishTime>11/29/2024 15:21:39</publishTime>
</File> </File>
<File Include="bin/Epost.DAL.pdb"> <File Include="bin/Epost.DAL.pdb">
<publishTime>11/26/2024 10:21:58</publishTime> <publishTime>11/29/2024 15:21:39</publishTime>
</File> </File>
<File Include="bin/Epost.DPS.dll"> <File Include="bin/Epost.DPS.dll">
<publishTime>11/26/2024 17:02:58</publishTime> <publishTime>11/29/2024 15:21:44</publishTime>
</File> </File>
<File Include="bin/Epost.DPS.pdb"> <File Include="bin/Epost.DPS.pdb">
<publishTime>11/26/2024 17:02:58</publishTime> <publishTime>11/29/2024 15:21:44</publishTime>
</File> </File>
<File Include="bin/Epost.Model.dll"> <File Include="bin/Epost.Model.dll">
<publishTime>11/26/2024 10:21:57</publishTime> <publishTime>11/29/2024 11:24:20</publishTime>
</File> </File>
<File Include="bin/Epost.Model.pdb"> <File Include="bin/Epost.Model.pdb">
<publishTime>11/26/2024 10:21:57</publishTime> <publishTime>11/29/2024 11:24: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/26/2024 17:03:00</publishTime> <publishTime>11/29/2024 15:21:45</publishTime>
</File> </File>
<File Include="Scripts/ai.0.22.9-build00167.js"> <File Include="Scripts/ai.0.22.9-build00167.js">
<publishTime>04/04/2018 15:45:12</publishTime> <publishTime>04/04/2018 15:45:12</publishTime>
@ -7572,7 +7572,7 @@
<publishTime>07/04/2022 14:22:38</publishTime> <publishTime>07/04/2022 14:22:38</publishTime>
</File> </File>
<File Include="Web.config"> <File Include="Web.config">
<publishTime>11/26/2024 10:07:59</publishTime> <publishTime>11/29/2024 11:33:14</publishTime>
</File> </File>
</ItemGroup> </ItemGroup>
</Project> </Project>