From 266e4bf654c55ce2f7e9271048e4625f1b8b49f6 Mon Sep 17 00:00:00 2001
From: heshaofeng <heshaofeng@hnkhzn.com>
Date: 星期一, 29 十二月 2025 14:36:08 +0800
Subject: [PATCH] Merge branch 'htq20251215' of http://115.159.85.185:8098/r/ZhongRui/ALDbanyunxiangmu into htq20251215
---
项目代码/WMS无仓储版/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BigGreen/BigScreenController.cs | 40 ++++++++++++++++++++++++++++++++++++++--
1 files changed, 38 insertions(+), 2 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BigGreen/BigScreenController.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BigGreen/BigScreenController.cs"
index bf058da..205397f 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BigGreen/BigScreenController.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS\346\227\240\344\273\223\345\202\250\347\211\210/WIDESEA_WMSServer/WIDESEA_WMSServer/Controllers/BigGreen/BigScreenController.cs"
@@ -2,7 +2,12 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
+using Newtonsoft.Json;
using WIDESEA_Core;
+using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Helper;
+using WIDESEA_Core.Util;
+using WIDESEA_Model.Models;
namespace WIDESEA_WMSServer.Controllers.BigGreen
{
@@ -11,15 +16,46 @@
public class BigScreenController : ControllerBase
{
private readonly IBigGreenService _bigGreenService;
- public BigScreenController(IBigGreenService bigGreenService)
+ private readonly HttpClientHelper _httpClientHelper;
+ private readonly IRepository<Dt_LocationInfo> _locationInfoRepository;
+
+ public BigScreenController(IBigGreenService bigGreenService, HttpClientHelper httpClientHelper, IRepository<Dt_LocationInfo> locationInfoRepository)
{
_bigGreenService = bigGreenService;
+ _httpClientHelper = httpClientHelper;
+ _locationInfoRepository = locationInfoRepository;
}
- [HttpGet, Route("GetBigGreenData"),AllowAnonymous]
+ [HttpGet, Route("GetBigGreenData"), AllowAnonymous]
public WebResponseContent GetBigGreenData()
{
return _bigGreenService.GetBigGreenData();
}
+ [HttpGet, Route("Test"), AllowAnonymous]
+ public WebResponseContent Test()
+ {
+ string url = "http://172.21.98.57:9046/location/query";
+ HttpResponseResult<Dictionary<string, object>> result = _httpClientHelper.Post<Dictionary<string, object>>(url, "{\"locationCodes\":[],\"containerCode\":\"\",\"locationTypeCodes\":[\"LT_SHELF_STORAGE\"]}");
+
+ if (result.Data.TryGetValue("data", out object? data))
+ {
+ if (JsonConvert.DeserializeObject<Dictionary<string, object>>(data.Serialize())?.TryGetValue("locations", out object? locations) ?? false)
+ {
+ List<Dictionary<string, object>>? keyValuePairs = JsonConvert.DeserializeObject<List<Dictionary<string, object>>>(locations.Serialize());
+ if (keyValuePairs != null)
+ {
+ List<string> list = keyValuePairs.Select(x => x["locationCode"].ToString() ?? "").ToList();
+
+ List<string> locationCodes = _locationInfoRepository.QueryData().Select(x => x.LocationCode).ToList();
+
+ List<string> notContainLocations = list.Where(x => !locationCodes.Contains(x)).ToList();
+
+ return WebResponseContent.Instance.OK(data: notContainLocations);
+ }
+ }
+ }
+ return WebResponseContent.Instance.OK();
+
+ }
}
}
--
Gitblit v1.9.3