服务端的TigerApi 框架,基于.NET6 2024 版本
Tiger.Business.WMS/Common/WmsTask.cs
@@ -8,6 +8,7 @@
using Tiger.IBusiness;
using Tiger.Model;
using Tiger.Model.Entitys.MES.Position;
using Tiger.Model.Entitys.MES.U9C;
using static IronPython.Modules._ast;
namespace Tiger.Business.WMS.Transaction
@@ -258,6 +259,7 @@
                    foreach (var item in CurInvItem.Items)
                    {
                        item.STATUS = WMS_ITEM.STATUSs.InStore.GetValue();
                        item.LOTNO = item.LOTNO.IsNullOrEmpty(new Barcode(item.SN).LotNo);
                        item.SUPP_LOTNO = CurInvItem.Barcode.LotNo;
                        item.FIRST_IN_DATE = item.FIRST_IN_DATE <= DateTime.MinValue ? DateTime.Now : item.FIRST_IN_DATE;
                        item.PROD_DATE = item.PROD_DATE <= DateTime.MinValue ? item.FIRST_IN_DATE : item.PROD_DATE;
@@ -792,8 +794,44 @@
            action.Data.MqttMsg = msg;
            return action;
        }
        /// <summary>
        /// 设置当前物料的默认储位
        /// </summary>
        public ApiAction<ScanOutput> SetDefaultLocation(DbClient db, BAS_ITEM Item, WMS_LOCATION location)
        {
            var action = new ApiAction<ScanOutput>(new ScanOutput());
            //调用设置默认储位接口
            //var iInput = new CreateRcvLineLocationInput
            //{
            //};
            //var result = await DI.Resolve<IWMS_U9C>().CreateRcvLineLocation(iInput);
            //if (!result.IsSuccessed)
            //{
            //    action.IsSuccessed = false;
            //    action.LocaleMsg = result.LocaleMsg;
            //}
            //else
            {
                Item.DEFAULT_LOCATION = location.LOCATION_CODE;
                db.Updateable(Item, UserCode).UpdateColumns(q => new { q.DEFAULT_LOCATION, q.UPDATE_TIME, q.UPDATE_USER }).ExecuteCommand();
            }
            return action;
        }
        #endregion Functions
        /// <summary>
        /// 重置本次扫码信息
        /// </summary>
        public virtual void ResetScan()
        {
            //清理暂存数据提交操作
            DBCommitList.Clear();
        }
        public override bool Close(bool needSaveHistoryLog = false)
        {
            //needSaveHistoryLog = true;