From 8c89f7c22bb2f4e2bede78e8abd806a77f7e5693 Mon Sep 17 00:00:00 2001
From: liuying <1427574514@qq.com>
Date: 周四, 25 4月 2024 13:01:23 +0800
Subject: [PATCH] css
---
iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/WmsPlaceService.cs | 111 +++++++++----------------------------------------------
1 files changed, 19 insertions(+), 92 deletions(-)
diff --git a/iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/WmsPlaceService.cs b/iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/WmsPlaceService.cs
index 250bf5c..ea3153d 100644
--- a/iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/WmsPlaceService.cs
+++ b/iWare_RawMaterialWarehouse_Wms/Admin.NET.Application/Service/WmsBase/WmsPlace/WmsPlaceService.cs
@@ -56,14 +56,6 @@
.Where(input.PlaceType != null, u => u.PlaceType == input.PlaceType)
.Where(!string.IsNullOrEmpty(input.PlaceTypeName), u => u.PlaceTypeName == input.PlaceTypeName)
.Where(input.PlaceStatus != null, u => u.PlaceStatus == input.PlaceStatus)
- .Where(input.IsSrmPlace != null, u => u.IsSrmPlace == input.IsSrmPlace)
- .Where(!string.IsNullOrEmpty(input.SrmPlaceNo), u => u.SrmPlaceNo == input.SrmPlaceNo)
- .Where(input.IsRgvPlace != null, u => u.IsRgvPlace == input.IsRgvPlace)
- .Where(!string.IsNullOrEmpty(input.RgvPlaceNo), u => u.RgvPlaceNo == input.RgvPlaceNo)
- .Where(input.IsAgvPlace != null, u => u.IsAgvPlace == input.IsAgvPlace)
- .Where(!string.IsNullOrEmpty(input.AgvPlaceNo), u => u.AgvPlaceNo == input.AgvPlaceNo)
- .Where(input.IsTransPlace != null, u => u.IsTransPlace == input.IsTransPlace)
- .Where(!string.IsNullOrEmpty(input.TransPlaceNo), u => u.TransPlaceNo == input.TransPlaceNo)
.Where(input.IsActivateWCS != null, u => u.IsActivateWCS == input.IsActivateWCS)
.Where(!string.IsNullOrEmpty(input.Environment), u => u.Environment == input.Environment)
.Where(!string.IsNullOrEmpty(input.AreaCode), u => u.AreaCode == input.AreaCode)
@@ -87,6 +79,8 @@
.Where(input.IsDisabled != null, u => u.IsDisabled == input.IsDisabled)
.Where(input.CreatedTime!=null, u => u.CreatedTime>= Convert.ToDateTime(input.CreatedTime[0]) && u.CreatedTime<= Convert.ToDateTime(input.CreatedTime[1]))
.Where(input.UpdatedTime!=null, u => u.UpdatedTime>= Convert.ToDateTime(input.UpdatedTime[0]) && u.UpdatedTime<= Convert.ToDateTime(input.UpdatedTime[1]))
+ .Where(!string.IsNullOrEmpty(input.CreatedUserName), u => u.CreatedUserName == input.CreatedUserName)
+ .Where(!string.IsNullOrEmpty(input.UpdatedUserName), u => u.UpdatedUserName == input.UpdatedUserName)
.OrderBy(PageInputOrder.OrderBuilder<WmsPlaceSearch>(input))
.ProjectToType<WmsPlaceOutput>()
.ToADPagedListAsync(input.PageNo, input.PageSize);
@@ -107,14 +101,6 @@
var pPlaceType = input.PlaceType;
var pPlaceTypeName = input.PlaceTypeName?.Trim() ?? "";
var pPlaceStatus = input.PlaceStatus;
- var pIsSrmPlace = input.IsSrmPlace;
- var pSrmPlaceNo = input.SrmPlaceNo?.Trim() ?? "";
- var pIsRgvPlace = input.IsRgvPlace;
- var pRgvPlaceNo = input.RgvPlaceNo?.Trim() ?? "";
- var pIsAgvPlace = input.IsAgvPlace;
- var pAgvPlaceNo = input.AgvPlaceNo?.Trim() ?? "";
- var pIsTransPlace = input.IsTransPlace;
- var pTransPlaceNo = input.TransPlaceNo?.Trim() ?? "";
var pIsActivateWCS = input.IsActivateWCS;
var pEnvironment = input.Environment?.Trim() ?? "";
var pAreaCode = input.AreaCode?.Trim() ?? "";
@@ -138,6 +124,8 @@
var pIsDisabled = input.IsDisabled;
var pCreatedTime = input.CreatedTime;
var pUpdatedTime = input.UpdatedTime;
+ var pCreatedUserName = input.CreatedUserName?.Trim() ?? "";
+ var pUpdatedUserName = input.UpdatedUserName?.Trim() ?? "";
var wmsPlaces = await _wmsPlaceRep.DetachedEntities
.Where(!string.IsNullOrEmpty(pPlaceCode), u => u.PlaceCode == pPlaceCode)
.Where(!string.IsNullOrEmpty(pPlaceName), u => u.PlaceName == pPlaceName)
@@ -145,14 +133,6 @@
.Where(pPlaceType != null, u => u.PlaceType == pPlaceType)
.Where(!string.IsNullOrEmpty(pPlaceTypeName), u => u.PlaceTypeName == pPlaceTypeName)
.Where(pPlaceStatus != null, u => u.PlaceStatus == pPlaceStatus)
- .Where(pIsSrmPlace != null, u => u.IsSrmPlace == pIsSrmPlace)
- .Where(!string.IsNullOrEmpty(pSrmPlaceNo), u => u.SrmPlaceNo == pSrmPlaceNo)
- .Where(pIsRgvPlace != null, u => u.IsRgvPlace == pIsRgvPlace)
- .Where(!string.IsNullOrEmpty(pRgvPlaceNo), u => u.RgvPlaceNo == pRgvPlaceNo)
- .Where(pIsAgvPlace != null, u => u.IsAgvPlace == pIsAgvPlace)
- .Where(!string.IsNullOrEmpty(pAgvPlaceNo), u => u.AgvPlaceNo == pAgvPlaceNo)
- .Where(pIsTransPlace != null, u => u.IsTransPlace == pIsTransPlace)
- .Where(!string.IsNullOrEmpty(pTransPlaceNo), u => u.TransPlaceNo == pTransPlaceNo)
.Where(pIsActivateWCS != null, u => u.IsActivateWCS == pIsActivateWCS)
.Where(!string.IsNullOrEmpty(pEnvironment), u => u.Environment == pEnvironment)
.Where(!string.IsNullOrEmpty(pAreaCode), u => u.AreaCode == pAreaCode)
@@ -176,6 +156,8 @@
.Where(pIsDisabled != null, u => u.IsDisabled == pIsDisabled)
.Where(input.CreatedTime!=null, u => u.CreatedTime>= Convert.ToDateTime(input.CreatedTime[0]) && u.CreatedTime<= Convert.ToDateTime(input.CreatedTime[1]))
.Where(input.UpdatedTime!=null, u => u.UpdatedTime>= Convert.ToDateTime(input.UpdatedTime[0]) && u.UpdatedTime<= Convert.ToDateTime(input.UpdatedTime[1]))
+ .Where(!string.IsNullOrEmpty(pCreatedUserName), u => u.CreatedUserName == pCreatedUserName)
+ .Where(!string.IsNullOrEmpty(pUpdatedUserName), u => u.UpdatedUserName == pUpdatedUserName)
.OrderBy(PageInputOrder.OrderNonPageBuilder(input))
.ProjectToType<WmsPlaceOutput>()
.ToListAsync();
@@ -436,6 +418,12 @@
}
}
+
+ if (string.IsNullOrEmpty(_PlaceTypeName))
+ {
+ throw Oops.Oh($"绗瑊index}琛孾搴撲綅绫诲瀷鍚嶇О]{_PlaceTypeName}涓嶈兘涓虹┖锛�");
+ }
+
if(!string.IsNullOrEmpty(_PlaceTypeName))
{
addItem.PlaceTypeName = (string)_PlaceTypeName;
@@ -460,74 +448,7 @@
}
}
- if(!string.IsNullOrEmpty(_IsSrmPlace))
- {
- if(!_IsSrmPlace.Equals("鏄�") && !_IsSrmPlace.Equals("鍚�"))
- {
- throw Oops.Oh($"绗瑊index}琛孾鏄惁鍫嗗灈鏈哄簱浣峕{_IsSrmPlace}鍊间笉姝g‘锛�");
- }
- else
- {
- bool outIsSrmPlace = _IsSrmPlace.Equals("鏄�") ? true : false;
- addItem.IsSrmPlace = outIsSrmPlace;
- }
- }
-
- if(!string.IsNullOrEmpty(_SrmPlaceNo))
- {
- addItem.SrmPlaceNo = (string)_SrmPlaceNo;
- }
- if(!string.IsNullOrEmpty(_IsRgvPlace))
- {
- if(!_IsRgvPlace.Equals("鏄�") && !_IsRgvPlace.Equals("鍚�"))
- {
- throw Oops.Oh($"绗瑊index}琛孾鏄惁RGV搴撲綅]{_IsRgvPlace}鍊间笉姝g‘锛�");
- }
- else
- {
- bool outIsRgvPlace = _IsRgvPlace.Equals("鏄�") ? true : false;
- addItem.IsRgvPlace = outIsRgvPlace;
- }
- }
-
- if(!string.IsNullOrEmpty(_RgvPlaceNo))
- {
- addItem.RgvPlaceNo = (string)_RgvPlaceNo;
- }
- if(!string.IsNullOrEmpty(_IsAgvPlace))
- {
- if(!_IsAgvPlace.Equals("鏄�") && !_IsAgvPlace.Equals("鍚�"))
- {
- throw Oops.Oh($"绗瑊index}琛孾鏄惁AGV搴撲綅]{_IsAgvPlace}鍊间笉姝g‘锛�");
- }
- else
- {
- bool outIsAgvPlace = _IsAgvPlace.Equals("鏄�") ? true : false;
- addItem.IsAgvPlace = outIsAgvPlace;
- }
- }
-
- if(!string.IsNullOrEmpty(_AgvPlaceNo))
- {
- addItem.AgvPlaceNo = (string)_AgvPlaceNo;
- }
- if(!string.IsNullOrEmpty(_IsTransPlace))
- {
- if(!_IsTransPlace.Equals("鏄�") && !_IsTransPlace.Equals("鍚�"))
- {
- throw Oops.Oh($"绗瑊index}琛孾鏄惁杈撻�佺嚎搴撲綅]{_IsTransPlace}鍊间笉姝g‘锛�");
- }
- else
- {
- bool outIsTransPlace = _IsTransPlace.Equals("鏄�") ? true : false;
- addItem.IsTransPlace = outIsTransPlace;
- }
- }
-
- if(!string.IsNullOrEmpty(_TransPlaceNo))
- {
- addItem.TransPlaceNo = (string)_TransPlaceNo;
- }
+
if(!string.IsNullOrEmpty(_IsActivateWCS))
{
if(!_IsActivateWCS.Equals("鏄�") && !_IsActivateWCS.Equals("鍚�"))
@@ -549,6 +470,12 @@
{
addItem.AreaCode = (string)_AreaCode;
}
+
+ if (string.IsNullOrEmpty(_AreaId))
+ {
+ throw Oops.Oh($"绗瑊index}琛孾鎵�鍦ㄥ簱鍖篯{_AreaId}涓嶈兘涓虹┖锛�");
+ }
+
if(!string.IsNullOrEmpty(_AreaId))
{
if (!long.TryParse(_AreaId, out long outAreaId)&&!string.IsNullOrEmpty(_AreaId))
--
Gitblit v1.9.3