From a544d13081b01f68824e80500c7c30ab2680d524 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周五, 10 10月 2025 16:08:03 +0800 Subject: [PATCH] //修复bug:查询出入库单据信息 【Editby shaocx,2025-09-29】 -- 这个功能没测试过,不一定好使啊啊啊啊啊!!!!! --- DEmon/iWareDataCore/BASE/Service/PlaceMaterialViewService.cs | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 files changed, 41 insertions(+), 5 deletions(-) diff --git a/DEmon/iWareDataCore/BASE/Service/PlaceMaterialViewService.cs b/DEmon/iWareDataCore/BASE/Service/PlaceMaterialViewService.cs index 729152b..b8ee996 100644 --- a/DEmon/iWareDataCore/BASE/Service/PlaceMaterialViewService.cs +++ b/DEmon/iWareDataCore/BASE/Service/PlaceMaterialViewService.cs @@ -43,12 +43,12 @@ - + /// <summary> /// 鑾峰彇鍚勭鐘舵�佺殑搴撲綅 /// </summary> /// <returns></returns> - public List<PlaceStatusNumEntity> GetPlaceStatusNum(out string msg) + public List<PlaceStatusNumEntity> GetPlaceStatusNum(out string msg) { msg = ""; List<PlaceStatusNumEntity> psnlst = new List<PlaceStatusNumEntity>(); @@ -77,7 +77,7 @@ /// </summary> /// <param name="msg"></param> /// <returns></returns> - public List<PlaceMaterialViewEntity> GetPlacePreview(out string msg) + public List<PlaceMaterialViewEntity> GetPlacePreview(out string msg) { msg = ""; List<PlaceMaterialViewEntity> psnlst = new List<PlaceMaterialViewEntity>(); @@ -87,7 +87,8 @@ { string sql = @"SELECT A.id, ISNULL(C.createtime,'1990-01-01') as createtime, ISNULL(C.updatetime,'1990-01-01') as updatetime, A.code AS placecode, A.status, A.islock, A.isexecute, B.name as placetypename, B.remark as placetyperemark, D.name, D.code AS materialcode, D.description, D.typeremark, D.typename, -ISNULL(D.status,0) AS materialstatus, A.id as placeid, ISNULL(C.materialid,0) as materialid, D.remark, A.layer, A.col, A.row, A.typeid as placetypeid +ISNULL(D.status,0) AS materialstatus, A.id as placeid, ISNULL(C.materialid,0) as materialid, D.remark, A.layer, A.col, A.row, A.typeid as placetypeid, +D.thick, D.wide, D.length,D.IssueProjectNo,D.ProcurementProjectNo,D.SerialNo,D.ClassificationSociety,D.CuttingType,D.Version FROM dbo.BASEPlace AS A LEFT OUTER JOIN dbo.BASEPlaceType AS B ON A.typeid = B.id LEFT OUTER JOIN dbo.BASEPlaceMaterial as C on A.id=C.placeid LEFT OUTER JOIN @@ -118,7 +119,7 @@ return mcore.BASEPlaceMaterialViews.FirstOrDefault(x => x.materialcode == materialcode).placecode; } - + } catch (Exception ex) { @@ -127,5 +128,40 @@ } } + + /// <summary> + /// 鏍规嵁鐗╂枡淇℃伅鍒楄〃鎵惧彇鎸囧畾鐨勫簱浣嶇墿鏂欎俊鎭� 銆怑ditby shaocx,2025-09-29銆� + /// </summary> + /// <param name="materialcode"></param> + /// <returns></returns> + public List<int> GetPlaceMaterialViewsByCodeList(List<string> materialcodeList, out string msg) + { + msg = ""; + try + { + using (DbModelCore mcore = new DbModelCore()) + { + + var list = mcore.BASEPlaceMaterialViews.Where(x => materialcodeList.Contains(x.materialcode)).ToList(); + foreach (var item in list) + { + if (!materialcodeList.Contains(item.materialcode)) + { + msg = $"鍞竴缂栫爜{item.materialcode}娌℃湁搴撳瓨"; + return null; + } + } + return list.Select(x => x.id).ToList(); + } + + } + catch (Exception ex) + { + msg = "寮傚父:" + ex.ToString(); + LogTextHelper.WriteLog(Resources.LogDir, this.ToString(), "GetPlaceMaterialViewsByCodeList", ex.Message); + return null; + } + } + } } -- Gitblit v1.9.3