From 5d639c50896850ee8065ee9b54b986dffd4593e2 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期三, 10 四月 2024 16:02:10 +0800 Subject: [PATCH] 移除Core --- Tiger.Business/WMS/T100ToWMS/MaterialInfoBusiness.cs | 60 ------------------------------------------------------------ 1 files changed, 0 insertions(+), 60 deletions(-) diff --git a/Tiger.Business/WMS/T100ToWMS/MaterialInfoBusiness.cs b/Tiger.Business/WMS/T100ToWMS/MaterialInfoBusiness.cs index d4904b6..729ef3d 100644 --- a/Tiger.Business/WMS/T100ToWMS/MaterialInfoBusiness.cs +++ b/Tiger.Business/WMS/T100ToWMS/MaterialInfoBusiness.cs @@ -15,8 +15,6 @@ using Tiger.Model.DTO; using Tiger.Model.Entitys.MES; using Tiger.Model.Entitys.WMS.DTOS; -using Web.Core.Entities.Response; -using Web.Core.DataBase; namespace Tiger.Business { @@ -2009,63 +2007,5 @@ return num; } - /// <summary> - /// 鑾峰彇瓒呮湡鐗╂枡淇℃伅 - /// </summary> - /// <param name="input"></param> - /// <returns></returns> - /// <exception cref="NotImplementedException"></exception> - public async Task<PageListModel<MaterialInfoDTO>> GetExtendedMaterialAsync(PageInput<NullDTO> input) - { - var DB = Biz.DataSource["WMS57"].Client; - - #region 鑾峰彇鎵�鏈夌殑鏉$爜鏈夋晥鏈熶俊鎭� - - var data = await DB.Queryable<WMS_ITEM, BAS_ITEM>((a, b) => new object[] - { - JoinType.Left, a.ITEM_CODE == b.ITEM_CODE - }).Where((a, b) => b.VALIDITY_DAYS != 0 && a.STATUS <= 40) - .OrderByDescending((a, b) => a.CREATE_TIME) - .Select((a, b) => new MaterialInfoDTO() - { - AUTH_ORG = a.AUTH_ORG, - SN = a.SN, - Item_Code = a.ITEM_CODE, - PROD_DATE = a.PROD_DATE, - VALIDITY_DAYS = b.VALIDITY_DAYS, - DepositDays = b.DepositDays, - PostponeDays = a.PostponeDays, - CreateTime = a.CREATE_TIME - }).ToListAsync(); - - #endregion 鑾峰彇鎵�鏈夌殑鏉$爜鏈夋晥鏈熶俊鎭� - - var msg = new List<MaterialInfoDTO>(); - foreach (var item in data) - { - // 鐢熶骇鏃ユ湡 + 鏈夋晥鏈� + 寤舵湡鏃堕暱 瓒呰繃浜嗗綋鍓嶆棩鏈燂紝灏辫〃绀哄凡瓒呮湡 - if (item.PROD_DATE?.AddDays(item.VALIDITY_DAYS.ToDouble()).AddDays(item.PostponeDays.ToDouble()) <= DateTime.Now) - { - var days = (DateTime.Now - item.PROD_DATE?.AddDays(item.VALIDITY_DAYS.ToDouble()).AddDays(item.PostponeDays.ToDouble())).Value.Days;// 璁$畻鍓╀綑鏈夋晥鏈熷ぉ鏁� - item.OverdueDays = days; - msg.Add(item); - } - } - - #region 鎵嬪姩鍒嗛〉 - - input.PageIndex = input.PageIndex < 1 ? 0 : input.PageIndex - 1; - var pagelist = msg.Skip(input.PageIndex * input.PageRows).Take(input.PageRows).ToList();// 鑾峰彇鍒嗛〉鏁版嵁 - - #endregion 鎵嬪姩鍒嗛〉 - - var model = new PageListModel<MaterialInfoDTO>() - { - PageList = pagelist, - Total = msg.Count() - }; - - return model; - } } } \ No newline at end of file -- Gitblit v1.9.3