南骏 池
4 天以前 0cdfda43fa2f992614a1c0f3bd1aee48eac13797
Controllers/AGV/AgvApiController.cs
@@ -7,6 +7,7 @@
using Newtonsoft.Json.Linq;
using System.ServiceModel;
using System.IO;
using NewPdaSqlServer.Dto.Warehouse;
namespace NewPdaSqlServer.Controllers.AGV;
@@ -57,7 +58,7 @@
    //立库送检
    [HttpPost("DefineTask_001")]
    public ResponseResult DefineTask_001(dynamic queryObj)
    public ResponseResult DefineTask_001(DefineTask001Dto dto)
    {
        try
        {
@@ -71,7 +72,16 @@
            var factory = new ChannelFactory<IImesInterface>(binding, endpoint);
            var channel = factory.CreateChannel();
            string result = channel.DefineTask_001("GS2025070700001","TEST.01","AGV测试物料名称", "AGV测试物料规格",100,"台",1);
            //string result = channel.DefineTask_001("GS2025070700001","TEST.01","AGV测试物料名称", "AGV测试物料规格",100,"台",1);
            string result = channel.DefineTask_001(
                dto.MesId,
                dto.MatId,
                dto.MatName,
                dto.MatStandard,
                dto.MatNumber,
                dto.MatUnit,
                dto.Postition);
            ((IClientChannel)channel).Close();
            return new ResponseResult
@@ -89,7 +99,7 @@
    //立库检验
    [HttpPost("DefineTask_002")]
    public ResponseResult DefineTask_002(dynamic queryObj)
    public ResponseResult DefineTask_002(DefineTask002Dto dto)
    {
        try
        {
@@ -103,7 +113,11 @@
            var factory = new ChannelFactory<IImesInterface>(binding, endpoint);
            var channel = factory.CreateChannel();
            string result = channel.DefineTask_002("GS2025070900010", "合格");
            //string result = channel.DefineTask_002("GS2025070900010", "合格");
            string result = channel.DefineTask_002(
                dto.MesId,
                dto.MatStatus);
            ((IClientChannel)channel).Close();
            return new ResponseResult
@@ -121,7 +135,7 @@
    //立库呼叫
    [HttpPost("DefineTask_005")]
    public ResponseResult DefineTask_005(dynamic queryObj)
    public ResponseResult DefineTask_005(DefineTask005Dto dto)
    {
        try
        {
@@ -135,7 +149,9 @@
            var factory = new ChannelFactory<IImesInterface>(binding, endpoint);
            var channel = factory.CreateChannel();
            string result = channel.DefineTask_005(2);
            //string result = channel.DefineTask_005(2);
            string result = channel.DefineTask_005(
                dto.Postition);
            ((IClientChannel)channel).Close();
            return new ResponseResult
@@ -154,7 +170,7 @@
    //立库入库
    [HttpPost("DefineTask_006")]
    public ResponseResult DefineTask_006(dynamic queryObj)
    public ResponseResult DefineTask_006(DefineTask006Dto dto)
    {
        try
        {
@@ -168,7 +184,15 @@
            var factory = new ChannelFactory<IImesInterface>(binding, endpoint);
            var channel = factory.CreateChannel();
            string result = channel.DefineTask_006("C2025070400040", "2.02.51.463", "管线饮水机", "C638-1HA(万和VGX-SR-1A-XM白)", 48, "台", 4);
            //string result = channel.DefineTask_006("C2025070400040", "2.02.51.463", "管线饮水机", "C638-1HA(万和VGX-SR-1A-XM白)", 48, "台", 4);
            string result = channel.DefineTask_006(
                dto.MesId,
                dto.MatId,
                dto.MatName,
                dto.MatStandard,
                dto.MatNumber,
                dto.MatUnit,
                dto.Postition);
            ((IClientChannel)channel).Close();
            return new ResponseResult
@@ -215,4 +239,4 @@
    [OperationContract(Action = "http://tempuri.org/ImesInterface/DefineTask_006",
              ReplyAction = "http://tempuri.org/ImesInterface/DefineTask_006Response")]
    string DefineTask_006(string MesId,string MatId,string MatName,string MatStandard,int MatNumber,string MatUnit,int Postition);
}
}