1
hutongqing
2025-01-15 baf2e27842ba7a0176ab4842377e721249966c9e
1
已删除1个文件
已修改7个文件
已添加5个文件
已重命名1个文件
168 ■■■■■ 文件已修改
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50784c2a-deac-4e4b-9412-581239bdaea2.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c27c829f-7a3d-4626-bb9f-b920ddec36a6.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ceed0040-40be-4d84-ae92-49490c0614dc.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f0ff9510-db3b-4549-baaa-b880ccefd2d7.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/wwwroot/logo/favicon-32x32.png 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ce8ba97c-1d90-4f9a-a3f1-69f1f87b2d47.vsidx 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/common/config.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/boxing.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
代码管理/淮安PDA/pages/stash/raworderboxing.vue 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/50784c2a-deac-4e4b-9412-581239bdaea2.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/c27c829f-7a3d-4626-bb9f-b920ddec36a6.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/ceed0040-40be-4d84-ae92-49490c0614dc.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/.vs/WIDESEAWCS_Server/FileContentIndex/f0ff9510-db3b-4549-baaa-b880ccefd2d7.vsidx
Binary files differ
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Controllers/Task/TaskController.cs
@@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Authorization;
using HslCommunication.WebSocket;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using WIDESEAWCS_Core;
@@ -16,11 +17,13 @@
    {
        private readonly IHttpContextAccessor _httpContextAccessor;
        private readonly IRouterExtension _routerExtension;
        private readonly WebSocketServer _webSocketServer;
        public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor, IRouterExtension routerExtension) : base(service)
        public TaskController(ITaskService service, IHttpContextAccessor httpContextAccessor, IRouterExtension routerExtension, WebSocketServer webSocketServer) : base(service)
        {
            _httpContextAccessor = httpContextAccessor;
            _routerExtension = routerExtension;
            _webSocketServer = webSocketServer;
        }
        [HttpPost, Route("ReceiveTask"), AllowAnonymous]
@@ -69,10 +72,25 @@
        {
            return Service.SendSecureReplyToAgv(taskNum);
        }
        [HttpPost, HttpGet, Route("GetRouteEndPoint"), AllowAnonymous]
        public WebResponseContent GetRouteEndPoint(string startPoint, int routeType)
        {
            return WebResponseContent.Instance.OK(data: _routerExtension.GetEndPoint(startPoint, routeType));
        }
        [HttpPost, HttpGet, Route("WebSocketPushMessage"), AllowAnonymous]
        public WebResponseContent WebSocketPushMessage(string message)
        {
            try
            {
                 _webSocketServer.PublishAllClientPayload(message);
                return WebResponseContent.Instance.OK();
            }
            catch(Exception ex)
            {
                return WebResponseContent.Instance.Error(ex.Message);
            }
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WarehouseHostedService.cs
@@ -1,4 +1,5 @@

using HslCommunication.WebSocket;
using SqlSugar;
using WIDESEAWCS_Core.Helper;
using WIDESEAWCS_Core.Seed;
@@ -12,11 +13,13 @@
    {
        private readonly ICacheService _cacheService;
        private readonly DBContext _dbContext;
        private readonly WebSocketServer _webSocketServer;
        public WarehouseHostedService(ICacheService cacheService, DBContext dbContext)
        public WarehouseHostedService(ICacheService cacheService, DBContext dbContext, WebSocketServer webSocketServer)
        {
            _cacheService = cacheService;
            _dbContext = dbContext;
            _webSocketServer = webSocketServer;
        }
        public Task StartAsync(CancellationToken cancellationToken)
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/HostedService/WebSocketSetup.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,29 @@
using HslCommunication.WebSocket;
using WIDESEAWCS_Core.Helper;
namespace WIDESEAWCS_Server.HostedService
{
    public static class WebSocketSetup
    {
        public static void AddWebSocketSetup(this IServiceCollection services)
        {
            if (services == null) throw new ArgumentNullException(nameof(services));
            if(AppSettings.Get("WebSocketEnable").ObjToBool())
            {
                int port = AppSettings.Get("WebSocketPort").ObjToInt();
                if (port == 0)
                {
                    port = 9296;
                }
                services.AddSingleton(x =>
                {
                    WebSocketServer socketServer = new WebSocketServer();
                    socketServer.ServerStart(port);
                    return socketServer;
                });
            }
        }
    }
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/Program.cs
@@ -51,6 +51,8 @@
builder.Services.AddHostedService<WarehouseHostedService>();
builder.Services.AddHostedService<QuartzJobDataTableHostedService>();
builder.Services.AddWebSocketSetup();
builder.Services.AddAutoMapperSetup();
builder.Services.AddCorsSetup();
@@ -112,13 +114,15 @@
app.UseAllServicesMiddle(builder.Services);
app.UseSession();
//if (app.Environment.IsDevelopment())
if (app.Environment.IsProduction())
{
    //todo
    app.UseSwaggerAuthorized();
    app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEAWCS_Server.index.html") ?? throw new Exception("未找到WIDESEAWCS_Server.index.html文件"));
}//判断是否需要打开swagger
app.UseSwaggerMiddle(() => Assembly.GetExecutingAssembly().GetManifestResourceStream("WIDESEAWCS_Server.index.html") ?? throw new Exception("未找到WIDESEAWCS_Server.index.html文件"));
app.UseIpLimitMiddle();
app.UseApiLogMiddleware();
//todo
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/appsettings.json
@@ -26,5 +26,7 @@
  "WMSApiAddress": "http://127.0.0.1:9293", //"http://127.0.0.1:9283",正式环境地址
  "ApiName": "WIDESEA",
  "ExpMinutes": 120,
  "QuartzJobAutoStart": true
  "QuartzJobAutoStart": true,
  "WebSocketEnable": true,
  "WebSocketPort": 9260
}
´úÂë¹ÜÀí/WCS/WIDESEAWCS_Server/WIDESEAWCS_Server/wwwroot/logo/favicon-32x32.png
´úÂë¹ÜÀí/WMS/WIDESEA_WMSServer/.vs/WIDESEA_WMSServer/FileContentIndex/ce8ba97c-1d90-4f9a-a3f1-69f1f87b2d47.vsidx
Binary files differ
´úÂë¹ÜÀí/»´°²PDA/common/config.js
@@ -1,5 +1,5 @@
let config = {
    baseUrl: 'http://localhost:9293',
    baseUrl: 'http://10.30.4.92:9293',
    urls: [
        'http://10.30.4.92:9283',
        'http://10.30.4.92:9283'
´úÂë¹ÜÀí/»´°²PDA/pages/stash/boxing.vue
@@ -383,22 +383,26 @@
            },
            snInput() {
                this.$nextTick(() => {
                    if (this.warehouseId == 6 || this.warehouseId == 2) {
                    if (this.warehouseId == 6 || this.warehouseId == 2 || this.warehouseId == 3) {
                        if (this.sns.length > 0) {
                            this.sns = [];
                        }
                    }
                    if (this.materSn != "") {
                        this.focus = false;
                        var matSn = this.materSn;
                        setTimeout(() => {
                        if(this.materSn.split(',').length != 6){
                            this.materSn = "";
                        }, 10);
                            return;
                        }
                        var matSn = this.materSn;
                        //setTimeout(() => {
                            this.materSn = "";
                        //}, 10);
                        this.$u.post('/api/MaterielInfo/CodeAnalysis?serNum=' + matSn, {}).then((res) => {
                            this.Testcheck = false;
                            if (res.status) {
                                this.sns.push(res.data.serialNumber);
                                if (this.warehouseId == 6 || this.warehouseId == 2) {
                                if (this.warehouseId == 6 || this.warehouseId == 2 || this.warehouseId == 3) {
                                    if (this.matInfos.length > 0) {
                                        this.matInfos = [];
                                    }
´úÂë¹ÜÀí/»´°²PDA/pages/stash/raworderboxing.vue
@@ -202,90 +202,6 @@
                innerAudioContext.src = src; // '../../static/success.mp3';
                innerAudioContext.play();
            },
            //解盘
            releasebox() {
                if (this.value.length == 0) {
                    this.$refs.uToast.show({
                        title: "请扫码",
                        type: "error"
                    })
                    return;
                }
                var param;
                var matInfo = this.value.split('|');
                if (matInfo.length == 7) {
                    param = {
                        MainData: {
                            "innerCode": this.value
                        }
                    }
                } else {
                    param = {
                        MainData: {
                            "barcode": this.value
                        }
                    }
                }
                this.$u.post('/api/StockOperate/ReleaseAllBox', param).then(resdt => {
                    if (resdt.status) {
                        uni.$showMsg('解盘成功!')
                        this.value = "";
                        this.matInfo = [];
                        this.matTotals = [];
                        this.value2 = "";
                    } else {
                        this.$refs.uToast.show({
                            title: resdt.message,
                            type: "error"
                        })
                    }
                })
            },
            releaseboxInput() {
                this.$nextTick(() => {
                    if (this.value.length == 0) {
                        return;
                    }
                    var matInfo = this.value.split('|');
                    this.matInfo = [];
                    if (matInfo.length == 7) {
                        this.$u.post('/api/StockOperate/GetStockInfoByInnerCode', {
                            MainData: {
                                "innerCode": this.value
                            }
                        }).then(res => {
                            if (res.status) {
                                this.matInfo = res.data.stockInfo;
                                this.matTotals = res.data.stockTotal;
                                this.value2 = res.data.barcode;
                            } else {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                                })
                            }
                        })
                    } else {
                        this.$u.post('/api/StockOperate/GetStockInfoByBarcode', {
                            MainData: {
                                "barcode": this.value
                            }
                        }).then(res => {
                            if (res.status) {
                                this.matInfo = res.data.stockInfo;
                                this.matTotals = res.data.stockTotal;
                                this.value2 = res.data.barcode;
                            } else {
                                this.$refs.uToast.show({
                                    title: res.message,
                                    type: "error"
                                })
                            }
                        })
                    }
                })
            },
            updateFocus() {
                debugger
                this.$nextTick(() => {