zhao
2021-06-04 c7ec496f9e41c2227103b3ef776e4a3f91bce6b2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
using HH.WMS.BLL;
using HH.WMS.BLL.Algorithm;
using HH.WMS.Common.Algorithm;
using HH.WMS.Entitys;
using HH.WMS.WebApi.Areas.Common.Controllers;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Web.Http;
 
namespace HH.WMS.WebApi.Areas.Sys.Controllers
{
    public class AlgorithmController : BaseController
    {
        #region 补料算法(PDA 物料上架)
        /// <summary>
        /// 补料算法
        /// </summary>
        /// <param name="tokenId">token验证值</param>
        /// <param name="trayCode">托盘编号</param>
        /// <param name="areaCode">库区编码</param>
        /// <param name="itemCode">物料编码</param>
        /// <returns></returns>
        /// <History>[HANHE(XDL)] CREATED BY 2018-11-22</History>
        [HttpGet]
        public string GetFeedAlgor(string tokenId, string trayCode, string areaCode, string itemCode)
        {
            try
            {
                //根据tokenId 获取当前登陆信息
                OperateResult resultInfo = GetTokenInfo(tokenId);
                if (!resultInfo.Success) return JsonConvert.SerializeObject(resultInfo);
 
                FeedAlgorEntity algorEntity = new FeedAlgorEntity();
                algorEntity.trayCode = trayCode;
                algorEntity.stockAreaCode = areaCode;
                algorEntity.itemCode = itemCode;
                FeedResultEntity resultEntity = BLLCreator.Create<Feed_AlgorBLL>().FeedEmptyLocation(algorEntity);
                return JsonConvert.SerializeObject(OperateResult.Succeed("", resultEntity));
            }
            catch (Exception ex)
            {
                return JsonConvert.SerializeObject( OperateResult.Error(ex.Message.ToString()));
               
            }
          
        }
        #endregion
    }
}