From ed05efdc17aab076146b134ebe105b6382f221d7 Mon Sep 17 00:00:00 2001 From: 啊鑫 <t2856754968@163.com> Date: 星期四, 10 七月 2025 10:09:29 +0800 Subject: [PATCH] 格式化代码 --- MES.Service/service/Warehouse/MesInvItemMovesManager.cs | 28 +++++++++++++++------------- 1 files changed, 15 insertions(+), 13 deletions(-) diff --git a/MES.Service/service/Warehouse/MesInvItemMovesManager.cs b/MES.Service/service/Warehouse/MesInvItemMovesManager.cs index 7f4e1df..31c8488 100644 --- a/MES.Service/service/Warehouse/MesInvItemMovesManager.cs +++ b/MES.Service/service/Warehouse/MesInvItemMovesManager.cs @@ -50,8 +50,9 @@ var iDepotCode = itemMoveQuery.InvDepotsCode; // 楠岃瘉搴撳尯涓庝粨搴� - var depotValidationQuery = Db.Queryable<MesDepotSections, MesDepots>( - (a, b) => new JoinQueryInfos( + var depotValidationQuery = Db + .Queryable<MesDepotSections, MesDepots>((a, b) => + new JoinQueryInfos( JoinType.Inner, a.Zuid.ToString() == b.Zuid)) .Where((a, b) => a.DepotSectionCode == query.sectionCode && b.DepotCode == iDepotCode) @@ -171,7 +172,7 @@ private List<MesInvItemOutItems> GetItemOutItems(WarehouseQuery query) { var sql = string.Format( - "SELECT C.ITEM_NO,C.QUANTITY, C.REMARK,C.REMARK,S.ITEM_NAME, S.ITEM_MODEL, U.FNAME ITEM_UNIT, D.QUANTITY_OK,NVL(ST.QUANTITY, 0) WLKC FROM MES_INV_ITEM_OUT_ITEMS C JOIN MES_ITEMS S ON C.ITEM_ID = S.ID LEFT JOIN MES_UNIT U ON U.ID = S.ITEM_UNIT LEFT JOIN MES_DEPOTS P ON P.DEPOT_CODE = C.DEPOT_CODE LEFT JOIN MES_DEPOT_SECTIONS E ON E.DEPOT_SECTION_CODE = C.DEPOT_SECTION_CODE LEFT JOIN (SELECT ITEM_MOVE_ID, ITEM_NO, SUM(QUANTITY) QUANTITY_OK FROM MES_INV_ITEM_MOVES_C_DETAILS GROUP BY ITEM_MOVE_ID, ITEM_NO) D ON D.ITEM_MOVE_ID = C.ITEM_OUT_ID AND D.ITEM_NO = C.ITEM_NO LEFT JOIN MES_INV_ITEM_MOVES A ON A.ID = C.ITEM_OUT_ID left join (SELECT ITEM_ID, SUM(QUANTITY) QUANTITY, DEPOTS_CODE FROM MES_INV_ITEM_STOCKS GROUP BY ITEM_ID, DEPOTS_CODE) ST ON C.ITEM_ID = ST.ITEM_ID AND ST.DEPOTS_CODE = A.FROM_DEPOTS_CODE where C.ITEM_OUT_ID = {0}", + "SELECT C.ITEM_NO, C.QUANTITY, C.REMARK, C.REMARK, S.ITEM_NAME, S.ITEM_MODEL, U.FNAME ITEM_UNIT, D.QUANTITY_OK, NVL(ST.QUANTITY, 0) WLKC FROM MES_INV_ITEM_OUT_ITEMS C JOIN MES_ITEMS S ON C.ITEM_ID = S.ID LEFT JOIN MES_UNIT U ON U.ID = S.ITEM_UNIT LEFT JOIN MES_DEPOTS P ON P.DEPOT_CODE = C.DEPOT_CODE LEFT JOIN MES_DEPOT_SECTIONS E ON E.DEPOT_SECTION_CODE = C.DEPOT_SECTION_CODE LEFT JOIN (SELECT ITEM_MOVE_ID, ITEM_NO, SUM(QUANTITY) QUANTITY_OK FROM MES_INV_ITEM_MOVES_C_DETAILS GROUP BY ITEM_MOVE_ID, ITEM_NO) D ON D.ITEM_MOVE_ID = C.ITEM_OUT_ID AND D.ITEM_NO = C.ITEM_NO LEFT JOIN MES_INV_ITEM_MOVES A ON A.ID = C.ITEM_OUT_ID left join (SELECT ITEM_ID, SUM(QUANTITY) QUANTITY, DEPOTS_CODE FROM MES_INV_ITEM_STOCKS GROUP BY ITEM_ID, DEPOTS_CODE) ST ON C.ITEM_ID = ST.ITEM_ID AND ST.DEPOTS_CODE = A.FROM_DEPOTS_CODE where C.ITEM_OUT_ID = {0}", query.id); return Db.Ado.SqlQuery<MesInvItemOutItems>(sql); @@ -180,13 +181,14 @@ private List<MesInvItemMovesCDetails> GetItemMovesCDetails( WarehouseQuery query) { - return Db.Queryable<MesInvItemMovesCDetails, MesItems, MesSupplier>( - (b, c, f) => new JoinQueryInfos( - JoinType.Left, - b.ItemNo == c.ItemNo && b.Company == c.Company && - b.Factory == c.Factory, - JoinType.Left, b.SuppNo == f.SuppNo - )) + return Db + .Queryable<MesInvItemMovesCDetails, MesItems, + MesSupplier>((b, c, f) => new JoinQueryInfos( + JoinType.Left, + b.ItemNo == c.ItemNo && b.Company == c.Company && + b.Factory == c.Factory, + JoinType.Left, b.SuppNo == f.SuppNo + )) .Where((b, c, f) => b.ItemMoveId == query.id) .Select((b, c, f) => new MesInvItemMovesCDetails { @@ -230,9 +232,9 @@ if (mesInvItemMoves == null) throw new Exception("鍑哄簱鍗� " + query.billNo + "涓嶅瓨鍦紝璇风‘璁わ紒"); - var count = Db.Queryable<MesInvItemMoves, MesInvItemMovesCDetails>( - (a, b) => - new JoinQueryInfos(JoinType.Inner, a.Id == b.ItemMoveId)) + var count = Db + .Queryable<MesInvItemMoves, MesInvItemMovesCDetails>((a, b) => + new JoinQueryInfos(JoinType.Inner, a.Id == b.ItemMoveId)) .Where((a, b) => b.ItemBarcode == query.barcode && a.TransactionNo == TransctionNo && SqlFunc.IsNull(a.Status, 0) == 0).Count(); -- Gitblit v1.9.3