From 41a5531dc31a642623f0a7a766fbe9c256ba9247 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 11 二月 2025 13:53:29 +0800
Subject: [PATCH] 优化WMS前端
---
项目代码/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs | 46 +++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 45 insertions(+), 1 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
index 9f05c33..c35b38c 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_BasicService/Base/LocationInfoService.cs"
@@ -2,9 +2,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using System.Reflection.Metadata;
using System.Text;
using System.Threading.Tasks;
using WIDESEA_Core;
+using WIDESEA_Core.BaseRepository;
using WIDESEA_Core.BaseServices;
using WIDESEA_Core.Enums;
using WIDESEA_Core.Helper;
@@ -41,7 +43,34 @@
{
return base.DeleteData(keys);
}
+ /// <summary>
+ /// 淇敼璐т綅鐨勭鐢ㄧ姸鎬�
+ /// </summary>
+ /// <param name="saveModel"></param>
+ /// <returns></returns>
+ public WebResponseContent UpdateEnableStatus(SaveModel saveModel)
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => saveModel.DelKeys.Contains(x.Id));
+ var values = Enum.GetValues(typeof(EnableStatusEnum));
+ var Index = saveModel.Extra.ObjToInt();
+ var EnableStatus = (EnableStatusEnum)values.GetValue(Index);
+ locationInfos.ForEach(x =>
+ {
+ x.EnableStatus = EnableStatus.ObjToInt();
+ });
+ Repository.UpdateData(locationInfos);
+ content.OK();
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
public WebResponseContent LocationEnableStatus(int[] keys)
{
List<Dt_LocationInfo> locationInfos = Repository.QueryData(x => keys.Contains(x.Id));
@@ -76,6 +105,21 @@
return LocationDisableStatus(new int[] { key });
}
+ public WebResponseContent GetLocationCodes()
+ {
+ WebResponseContent content = new WebResponseContent();
+ try
+ {
+ //content.OK(_basicRepository.MaterielInfoRepository.Getmaterianame(saveModel).Message, Repository.QueryData(x => x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()).Select(x => x.LocationCode).ToList());
+ content.OK(data: Repository.QueryData(x => x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()).Select(x => x.LocationCode).ToList());
+ }
+ catch (Exception ex)
+ {
+ content.Error(ex.Message);
+ }
+ return content;
+ }
+
public WebResponseContent InitializationLocation(InitializationLocationDTO initializationLocationDTO)
{
try
@@ -101,7 +145,7 @@
LocationType = LocationTypeEnum.Cube.ObjToInt(),
RoadwayNo = initializationLocationDTO.Roadway,
Row = i + 1,
- MaxQty = i == 1 ? 24 : 12,
+ MaxQty = 12,
CurrentQty = 0,
};
--
Gitblit v1.9.3