647556386
2025-08-10 75e3bca44b111c167b9389e4e51b2ce577a9f9e0
优化更新
已添加1个文件
已修改11个文件
443 ■■■■ 文件已修改
WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_Core/DB/IBaseHistoryEntity.cs 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs 91 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs 80 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs 109 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
吉安PDA/common/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
吉安PDA/pages/home/home.vue 102 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
吉安PDA/pages/stash/raworderboxing.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WMS/WIDESEA_WMSServer/WIDESEA_Core/CodeConfigEnum/AnalysisFormatTypeEnum.cs
@@ -62,5 +62,10 @@
        /// </summary>
        [Description("原始数据")]
        BD,
        /// <summary>
        /// éƒ¨ä»¶å·
        /// </summary>
        [Description("交货单号")]
        DN,
    }
}
WMS/WIDESEA_WMSServer/WIDESEA_Core/DB/IBaseHistoryEntity.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,37 @@
using Magicodes.ExporterAndImporter.Core;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WIDESEA_Core.DB.Models
{
    public interface IBaseHistoryEntity
    {
        /// <summary>
        /// åŽŸè¡¨ä¸»é”®
        /// </summary>
        [ImporterHeader(Name = "原表主键")]
        [ExporterHeader(DisplayName = "原表主键")]
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "原表主键")]
        public int SourceId { get; set; }
        /// <summary>
        /// æ“ä½œç±»åž‹
        /// </summary>
        [ImporterHeader(Name = "操作类型")]
        [ExporterHeader(DisplayName = "操作类型")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "操作类型")]
        public string OperateType { get; set; }
        /// <summary>
        /// ç§»å…¥åŽ†å²æ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "移入历史时间")]
        [ExporterHeader(DisplayName = "移入历史时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "移入历史时间")]
        public DateTime InsertTime { get; set; }
    }
}
WMS/WIDESEA_WMSServer/WIDESEA_DTO/Basic/MatSerNumAnalysisModel.cs
@@ -51,6 +51,12 @@
        public decimal Quantity { get; set; }
        /// <summary>
        /// é€è´§å•号
        /// </summary>
        [AnalysisItemRule(AnalysisFormatTypeEnum.DN), PropertyValidate("送货单号", NotNullAndEmpty = true)]
        public string DeliveryNote { get; set; }
        /// <summary>
        /// åŽŸå§‹æ•°æ®
        /// </summary>
        [AnalysisItemRule(AnalysisFormatTypeEnum.BD), PropertyValidate("原始数据", NotNullAndEmpty = true)]
WMS/WIDESEA_WMSServer/WIDESEA_InboundService/Base/InboundOrderService.cs
@@ -140,7 +140,7 @@
                        StockStatus = (int)StockStatusEmun.组盘暂存,
                        Creater = "WMS",
                        CreateDate = DateTime.Now,
                        MaterialType = (int)InventoryMaterialType.成品,
                        MaterialType = (int)InventoryMaterialType.原材料,
                        Materialweight = 0,
                        Wlstatus = (int)InventoryMaterialStatus.合格,
                        Mgeneratetime = DateTime.Now,
@@ -208,6 +208,7 @@
                        Creater = "WMS",
                        CreateDate = DateTime.Now,
                        Id = inboundOrderDet.LinId.ObjToInt(),
                        DeliveryNote = model.DeliveryNote
                    };
                    if (stockInfo.Id > 0)
WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail.cs
@@ -69,6 +69,10 @@
        [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "实盘数量", DefaultValue = "0")]
        public decimal FinishQty { get; set; }
        [ExporterHeader(DisplayName = "送货单号")]
        [SugarColumn(IsNullable = true, ColumnDescription = "送货单号")]
        public string DeliveryNote { get; set; }
        [ExporterHeader(IsIgnore = true)]
        [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))]
        public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; }
WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfoDetail_Hty.cs
@@ -9,81 +9,34 @@
namespace WIDESEA_Model.Models
{
    [SugarTable(nameof(Dt_StockInfoDetail_Hty), "库存信息明细")]
    public class Dt_StockInfoDetail_Hty
    /// <summary>
    /// åº“存信息明细历史
    /// </summary>
    [SugarTable(nameof(Dt_StockInfoDetail_Hty), "库存信息明细历史")]
    public class Dt_StockInfoDetail_Hty : Dt_StockInfoDetail, IBaseHistoryEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "库存信息主键")]
        public int StockId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "物料编号")]
        public string MaterielCode { get; set; }
        [SugarColumn(IsNullable = false, Length = 200, ColumnDescription = "物料名称")]
        public string MaterielName { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "单据编号")]
        public string OrderNo { get; set; }
        [SugarColumn(IsNullable = false, Length = 20, ColumnDescription = "批次号")]
        public string BatchNo { get; set; }
        [SugarColumn(IsNullable = false, Length = 100, ColumnDescription = "序列号")]
        public string SerialNumber { get; set; }
        [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "库存数量")]
        public decimal StockQuantity { get; set; }
        [SugarColumn(IsNullable = false, DecimalDigits = 2, ColumnDescription = "出库数量", DefaultValue = "0")]
        public decimal OutboundQuantity { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "库存明细状态")]
        public int Status { get; set; }
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
        [Navigate(NavigateType.OneToOne, nameof(Dt_StockQuantityChangeRecord.StockDetailId), nameof(Id))]
        public Dt_StockQuantityChangeRecord StockQuantityChangeRecord { get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        /// <summary>
        /// åŽŸè¡¨ä¸»é”®
        /// </summary>
        [ImporterHeader(Name = "原表主键")]
        [ExporterHeader(DisplayName = "原表主键")]
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "原表主键")]
        public int SourceId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "备注")]
        /// <summary>
        /// æ“ä½œç±»åž‹
        /// </summary>
        [ImporterHeader(Name = "操作类型")]
        [ExporterHeader(DisplayName = "操作类型")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "操作类型")]
        public string OperateType { get; set; }
        /// <summary>
        /// åˆ›å»ºäºº
        /// </summary>
        [ImporterHeader(Name = "创建人")]
        [ExporterHeader(DisplayName = "创建人")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "创建人")]
        public string Creater { get; set; }
        /// <summary>
        /// åˆ›å»ºæ—¶é—´
        /// ç§»å…¥åŽ†å²æ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "创建时间")]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°è€…
        /// </summary>
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
        /// </summary>
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
        [ImporterHeader(Name = "移入历史时间")]
        [ExporterHeader(DisplayName = "移入历史时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "移入历史时间")]
        public DateTime InsertTime { get; set; }
    }
}
WMS/WIDESEA_WMSServer/WIDESEA_Model/Models/Stock/Dt_StockInfo_Hty.cs
@@ -9,72 +9,34 @@
namespace WIDESEA_Model.Models
{
    /// <summary>
    /// åº“存信息历史
    /// </summary>
    [SugarTable(nameof(Dt_StockInfo_Hty), "库存信息")]
    public class Dt_StockInfo_Hty
    public class Dt_StockInfo_Hty : Dt_StockInfo, IBaseHistoryEntity
    {
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true, ColumnDescription = "主键")]
        public int Id { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "托盘编号")]
        public string PalletCode { get; set; }
        [SugarColumn(IsNullable = true, Length = 20, ColumnDescription = "货位编号")]
        public string LocationCode { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "是否满盘", DefaultValue = "0")]
        public bool IsFull { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "库存状态")]
        public int StockStatus { get; set; }
        [SugarColumn(IsNullable = true, ColumnDescription = "备注")]
        public string Remark { get; set; }
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "源主键")]
        /// <summary>
        /// åŽŸè¡¨ä¸»é”®
        /// </summary>
        [ImporterHeader(Name = "原表主键")]
        [ExporterHeader(DisplayName = "原表主键")]
        [SugarColumn(IsNullable = false, DefaultValue = "0", ColumnDescription = "原表主键")]
        public int SourceId { get; set; }
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "备注")]
        /// <summary>
        /// æ“ä½œç±»åž‹
        /// </summary>
        [ImporterHeader(Name = "操作类型")]
        [ExporterHeader(DisplayName = "操作类型")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "操作类型")]
        public string OperateType { get; set; }
        /// <summary>
        /// åˆ›å»ºäºº
        /// </summary>
        [ImporterHeader(Name = "创建人")]
        [ExporterHeader(DisplayName = "创建人")]
        [SugarColumn(IsNullable = false, Length = 50, ColumnDescription = "创建人")]
        public string Creater { get; set; }
        /// <summary>
        /// åˆ›å»ºæ—¶é—´
        /// ç§»å…¥åŽ†å²æ—¶é—´
        /// </summary>
        [ImporterHeader(Name = "创建时间")]
        [ExporterHeader(DisplayName = "创建时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "创建时间")]
        public DateTime CreateDate { get; set; } = DateTime.Now;
        /// <summary>
        /// æ›´æ–°è€…
        /// </summary>
        [ImporterHeader(Name = "修改人")]
        [ExporterHeader(DisplayName = "修改人")]
        [SugarColumn(IsNullable = true, Length = 50, ColumnDescription = "修改人")]
        public string Modifier { get; set; }
        /// <summary>
        /// ä¿®æ”¹æ—¥æœŸ
        /// </summary>
        [ImporterHeader(Name = "修改日期")]
        [ExporterHeader(DisplayName = "修改日期")]
        [SugarColumn(IsNullable = true, ColumnDescription = "修改日期")]
        public DateTime? ModifyDate { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "类型")]
        public int MaterialType { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "物料状态")]
        public int Wlstatus { get; set; }
        [SugarColumn(IsNullable = false, ColumnDescription = "重量")]
        public decimal Materialweight { get; set; }
        [SugarColumn(IsNullable = true, ColumnDescription = "生产时间")]
        public DateTime Mgeneratetime { get; set; }
        [ImporterHeader(Name = "移入历史时间")]
        [ExporterHeader(DisplayName = "移入历史时间")]
        [SugarColumn(IsNullable = false, ColumnDescription = "移入历史时间")]
        public DateTime InsertTime { get; set; }
    }
}
WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService.cs
@@ -462,7 +462,8 @@
        {
            // æ›´æ–°å…¥åº“单明细状态
            UpdateInboundOrderDetails(stockInfo, inboundOrder, ref inboundOrderDetail);
            ///更新库存状态
            stockInfo.StockStatus = StockStatusEmun.入库完成.ObjToInt();
            // æ›´æ–°åº“存明细状态
            stockInfo.Details.ForEach(x => x.Status = StockStatusEmun.入库完成.ObjToInt());
@@ -840,17 +841,15 @@
                int lastStatus = locationInfo.LocationStatus;
                locationInfo.LocationStatus = LocationStatusEnum.InStock.ObjToInt();
                Dt_OutboundOrderDetail outboundOrderDetails = _outboundService.OutboundOrderService.Db.Queryable<Dt_OutboundOrderDetail>()
                    .Where(x => x.BatchNo == stockInfo.Details.FirstOrDefault().BatchNo)
                    .First();
                if (outboundOrderDetails == null) return WebResponseContent.Instance.Error("未找到出库单信息");
                Dt_OutboundOrder inboundOrder = _outboundService.OutboundOrderService.Db.Queryable<Dt_OutboundOrder>()
    .Where(x => x.Id == outboundOrderDetails.OrderId)
    .Includes(x => x.Details)
    .First();
                .Where(x => x.Id == outboundOrderDetails.OrderId)
                .Includes(x => x.Details)
                .First();
                if (inboundOrder == null) return WebResponseContent.Instance.Error("未找到出库单信息");
                // 2. å¤„理出库订单详情
@@ -859,7 +858,7 @@
                UpdateOutboundOrderDetails(stockInfo, inboundOrder, ref outboundOrderDetails);
                // 3. æ‰§è¡Œæ ¸å¿ƒå‡ºåº“逻辑
                return ExecuteOutboundLogic(task, stockInfo, locationInfo, outboundOrderDetails);
                return ExecuteOutboundLogic(task, stockInfo, locationInfo, outboundOrderDetails, inboundOrder);
            }
            catch (Exception ex)
            {
@@ -917,18 +916,18 @@
        //}
        private WebResponseContent ExecuteOutboundLogic(Dt_Task task, Dt_StockInfo stockInfo,
            Dt_LocationInfo locationInfo, Dt_OutboundOrderDetail outboundOrderDetails)
            Dt_LocationInfo locationInfo, Dt_OutboundOrderDetail outboundOrderDetails,Dt_OutboundOrder inboundOrder)
        {
            try
            {
                _unitOfWorkManage.BeginTran();
                ///更新出库单
                _outboundService.OutboundOrderService.Repository.UpdateData(inboundOrder);
                // æ›´æ–°å‡ºåº“订单详情
                _outboundService.OutboundOrderDetailService.Repository.UpdateData(outboundOrderDetails);
                // æ›´æ–°åº“存状态
                UpdateStockStatus(stockInfo, locationInfo);
                DeleteAndMoveIntoHtStockStatus(stockInfo);
                // æ›´æ–°è´§ä½çŠ¶æ€
                UpdateLocationStatus(locationInfo);
@@ -971,8 +970,7 @@
                throw;
            }
        }
        private void UpdateOutboundOrderDetails(Dt_StockInfo stockInfo, Dt_OutboundOrder inboundOrder,
    ref Dt_OutboundOrderDetail inboundOrderDetail)
        private void UpdateOutboundOrderDetails(Dt_StockInfo stockInfo, Dt_OutboundOrder inboundOrder,ref Dt_OutboundOrderDetail inboundOrderDetail)
        {
            int overCount = inboundOrder.Details.Count(x => x.OrderDetailStatus == OrderDetailStatusEnum.Over.ObjToInt());
            inboundOrderDetail = inboundOrder.Details.FirstOrDefault(x => x.BatchNo == stockInfo.Details.FirstOrDefault()?.BatchNo);
@@ -1000,16 +998,10 @@
            }
        }
        private void UpdateStockStatus(Dt_StockInfo stockInfo, Dt_LocationInfo locationInfo)
        private void DeleteAndMoveIntoHtStockStatus(Dt_StockInfo stockInfo)
        {
            stockInfo.LocationCode = "";
            stockInfo.StockStatus = StockStatusEmun.出库完成.ObjToInt();
            stockInfo.Details.ForEach(x =>
            {
                x.Status = StockStatusEmun.出库完成.ObjToInt();
            });
            _stockRepository.StockInfoRepository.UpdateData(stockInfo);
            _stockRepository.StockInfoDetailRepository.UpdateData(stockInfo.Details);
            _stockService.StockInfoService.Repository.DeleteAndMoveIntoHty(stockInfo, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
            _stockService.StockInfoDetailService.Repository.DeleteAndMoveIntoHty(stockInfo.Details, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
        }
        private void UpdateLocationStatus(Dt_LocationInfo locationInfo)
@@ -1021,6 +1013,7 @@
        private void CompleteTask(Dt_Task task)
        {
            task.TaskStatus = OutTaskStatusEnum.OutFinish.ObjToInt();
            BaseDal.DeleteAndMoveIntoHty(task, App.User.UserId == 0 ? OperateType.自动完成 : OperateType.人工完成);
        }
@@ -1129,48 +1122,46 @@
        private void SendNormalOutboundToWMS(Dt_Task task, Dt_OutboundOrder outboundOrder,
            Dt_StockInfoDetail stockInfoDetail, Dt_OutboundOrderDetail outDetail)
        {
            //List<Dt_StockInfo> StockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == task.WarehouseId).Includes(x => x.Details).Where(x => x.Details.Any(v => v.BatchNo == outDetail.BatchNo)).ToList();
            List<Dt_OutStockLockInfo> outStockLockInfos = _outboundService.OutboundStockLockInfoService.Repository.QueryData(x => x.OrderNo == outboundOrder.OrderNo);
            if (outStockLockInfos.Count == 0) throw new Exception("未找到库存信息");
            // æž„建回传数据,将所有匹配的库存明细加入 DetailList
            var passBack = new HouseoutboundPassBack
            {
                ApiType = "InventoryAllocateController",
                Method = "AsrsFinishedStockCount",
                Parameters = new List<HouseoutboundPassBack.datas>
    {
        new HouseoutboundPassBack.datas
        {
            Value = new List<HouseoutboundPassBack.datas.data1>
            {
                new HouseoutboundPassBack.datas.data1
                //List<Dt_StockInfo> StockInfos = _stockRepository.StockInfoRepository.Db.Queryable<Dt_StockInfo>().Where(x => x.WarehouseId == task.WarehouseId).Includes(x => x.Details).Where(x => x.Details.Any(v => v.BatchNo == outDetail.BatchNo)).ToList();
                List<Dt_OutStockLockInfo> outStockLockInfos = _outboundService.OutboundStockLockInfoService.Repository.QueryData(x => x.OrderNo == outboundOrder.OrderNo);
                if (outStockLockInfos.Count == 0) throw new Exception("未找到库存信息");
                // æž„建回传数据,将所有匹配的库存明细加入 DetailList
                var passBack = new HouseoutboundPassBack
                {
                    No = outboundOrder.OrderNo,
                    OutWareHouse = task.Roadway,
                    TransactionCode = outboundOrder.TransactionCode,
                    InoutType = outboundOrder.OrderType,
                    OrderType = outboundOrder.InoutType,
                    DetailList = outStockLockInfos.Select(d => new HouseoutboundPassBack.datas.data1.Inbound
                        {
                            LinId = d.LinId?? "",
                            LPN_No = d.PalletCode,
                            MaterielCode = d.MaterielCode?? "",
                            OrderQuantity = d.OrderQuantity,
                            BatchNo = d.BatchNo,
                            FinishQty = d.OrderQuantity,
                            LocationName = d.LocationCode
                        })
                        .ToList()
                    ApiType = "InventoryAllocateController",
                    Method = "AsrsFinishedStockCount",
                    Parameters = new List<HouseoutboundPassBack.datas>
            {
            new HouseoutboundPassBack.datas
            {
                Value = new List<HouseoutboundPassBack.datas.data1>
                {
                    new HouseoutboundPassBack.datas.data1
                    {
                        No = outboundOrder.OrderNo,
                        OutWareHouse = task.Roadway,
                        TransactionCode = outboundOrder.TransactionCode,
                        InoutType = outboundOrder.OrderType,
                        OrderType = outboundOrder.InoutType,
                        DetailList = outStockLockInfos.Select(d => new HouseoutboundPassBack.datas.data1.Inbound
                            {
                                LinId = d.LinId?? "",
                                LPN_No = d.PalletCode,
                                MaterielCode = d.MaterielCode?? "",
                                OrderQuantity = d.OrderQuantity,
                                BatchNo = d.BatchNo,
                                FinishQty = d.OrderQuantity,
                                LocationName = d.LocationCode
                            })
                            .ToList()
                    }
                }
            }
        }
    }
            };
WMS/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/Basic/MaterielInfoController.cs
@@ -29,6 +29,8 @@
        /// <returns></returns>
        [HttpPost, HttpGet, Route("CodeAnalysis")]
        public WebResponseContent CodeAnalysis(string serNum)
        {
            try
            {
¼ª°²PDA/common/config.js
@@ -1,6 +1,6 @@
let config = {
    baseUrl: 'http://127.0.0.1:9290',
        // baseUrl: 'http://10.168.1.226:9290',
    //baseUrl: 'http://10.168.1.226:9290',
    urls: [
        'http://10.30.4.92:9283',
        'http://10.30.4.92:9283'
¼ª°²PDA/pages/home/home.vue
@@ -7,42 +7,24 @@
            <view class="card">
                <view class="top">
                    <view class="userImage">
                        <!-- <open-data type="userAvatarUrl"></open-data> -->
                        <u-avatar :src="src" size="146"></u-avatar>
                    </view>
                </view>
                <view class="bottom" @tap.native="Login">
                    <view class="left">
                        <view class="user-text">
                            <!-- <open-data type="userNickName"></open-data> -->
                            <text style="text-align: center;">{{userNickName}}</text>
                        </view>
                        <!-- <view class="user-phone"> 171****4133 </view> -->
                    </view>
                    <view class="right flex-center">
                        <u-icon class="icon" name="arrow-right"></u-icon>
                    </view>
                </view>
                <!-- <view class="settings" @click="settings">
                    <view class="left">
                        <view class="settings-text">
                            <open-data type="userNickName"></open-data>
                            <text style="text-align: center;">设置</text>
                        </view>
                        <view class="user-phone"> 171****4133 </view>
                    </view>
                    <view class="right flex-center">
                        <u-icon class="icon" name="arrow-right"></u-icon>
                    </view>
                </view> -->
            </view>
        </view>
        <view class="list-card">
        </view>
        <view class="quit flex-center">
            <!-- <view class="btn flex-center" @click="LastLogin">
                æ›´æ–°ç¨‹åº
            </view> -->
            <view class="btn flex-center" @click="LastLogin">
                é€€å‡ºç™»å½•
            </view>
@@ -225,35 +207,73 @@
</style>
<script>
    //import {  } from "@/common/api/{$}.js";
    import httpInterceptor from '@/common/http.interceptor.js'
    export default {
        data() {
            return {
                src: "",
                userNickName: '请登录',
                // è¿‡æœŸæ—¶é—´æ£€æŸ¥å®šæ—¶å™¨
                checkExpirationTimer: null
            };
        },
        //监听页面初始化,其参数同 onLoad å‚数,为上个页面传递的数据,参数类型为 Object(用于页面传参),触发时机早于 onLoad
        onInit() {},
        //监听页面加载,其参数为上个页面传递的数据,参数类型为 Object(用于页面传参)
        onLoad() {
            let isLogin = this.hasLogin();
            if (isLogin) {
                let haslogin = uni.getStorageSync('jo_user')
                this.userNickName = haslogin.userName;
                this.src = httpInterceptor.baseUrl + "/" + haslogin.img;
            // æ£€æŸ¥ç™»å½•状态和是否过期
            this.checkLoginStatus();
            // è®¾ç½®å®šæ—¶æ£€æŸ¥ï¼Œæ¯30分钟检查一次
            this.checkExpirationTimer = setInterval(() => {
                this.checkLoginExpiration();
            }, 30 * 60 * 1000);
        },
        onUnload() {
            // é¡µé¢å¸è½½æ—¶æ¸…除定时器
            if (this.checkExpirationTimer) {
                clearInterval(this.checkExpirationTimer);
            }
        },
        //监听页面初次渲染完成。注意如果渲染速度快,会在页面进入动画完成前触发
        onReady() {},
        //监听页面显示。页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面
        beforeDestroy() {},
        //页面滚动到底部的事件(不是scroll-view滚到底),常用于下拉下一页数据。
        onReachBottom() {},
        onShareAppMessage(res) {},
        created() {},
        onShow() {
            // é¡µé¢æ˜¾ç¤ºæ—¶å†æ¬¡æ£€æŸ¥
            this.checkLoginStatus();
        },
        methods: {
            // æ£€æŸ¥ç™»å½•状态
            checkLoginStatus() {
                let isLogin = this.hasLogin();
                if (isLogin) {
                    // æ£€æŸ¥æ˜¯å¦è¿‡æœŸ
                    if (this.checkLoginExpiration()) {
                        let haslogin = uni.getStorageSync('jo_user')
                        this.userNickName = haslogin.userName;
                        this.src = httpInterceptor.baseUrl + "/" + haslogin.img;
                    }
                }
            },
            // æ£€æŸ¥ç™»å½•是否过期
            checkLoginExpiration() {
                const expirationTime = uni.getStorageSync('jo_expiration_time');
                const currentTime = new Date().getTime();
                // å¦‚果没有设置过期时间,视为未登录
                if (!expirationTime) {
                    this.logout();
                    return false;
                }
                // æ£€æŸ¥æ˜¯å¦è¿‡æœŸ
                if (currentTime > expirationTime) {
                    uni.showToast({
                        title: '登录已过期,请重新登录',
                        icon: 'none',
                        duration: 2000
                    });
                    this.logout();
                    return false;
                }
                return true;
            },
            hasLogin() {
                let haslogin = uni.getStorageSync('jo_user')
                if (haslogin == null || haslogin == "") {
@@ -263,11 +283,19 @@
                }
            },
            // é€€å‡ºç™»å½•
            LastLogin() {
                //uni.clearStorage();
                this.logout();
            },
            // ç»Ÿä¸€çš„退出登录处理
            logout() {
                uni.removeStorageSync('jo_id_token');
                uni.removeStorageSync('jo_user');
                uni.removeStorageSync('jo_userImg');
                uni.removeStorageSync('jo_expiration_time'); // æ¸…除过期时间
                this.userNickName = '请登录';
                this.src = "";
                this.$u.route('/pages/login/login');
            },
@@ -279,4 +307,4 @@
            }
        },
    };
</script>
</script>
¼ª°²PDA/pages/stash/raworderboxing.vue
@@ -57,6 +57,7 @@
                                        <view class="uni-note">数量:{{item.quantity}}</view>
                                        <view class="uni-note">生产日期:{{item.productionDate}}</view>
                                        <view class="uni-note">有效期:{{item.effectiveDate}}</view>
                                        <view class="uni-note">交货单号:{{item.deliveryNote}}</view>
                                    </view>
                                </view>
                            </template>
@@ -134,6 +135,7 @@
                                        <view class="uni-note">数量:{{item.quantity}}</view>
                                        <view class="uni-note">生产日期:{{item.productionDate}}</view>
                                        <view class="uni-note">有效期:{{item.effectiveDate}}</view>
                                        <view class="uni-note">交货单号:{{item.deliveryNote}}</view>
                                    </view>
                                </view>
                            </template>