From 1917d69c4ae0d3f702948f27373a9e1bebcf503c Mon Sep 17 00:00:00 2001 From: liqionghai <1> Date: Thu, 18 Sep 2025 10:15:46 +0800 Subject: [PATCH] 1 --- HKBaoBiao/回款报表服务器插件.py | 4 ++-- YSZKDZGongNeng_MX/LiteVersionPlugIn2.cs | 9 +++++---- .../应收对账单明细更新发票金额存储过程.sql | 17 +++++++++++------ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/HKBaoBiao/回款报表服务器插件.py b/HKBaoBiao/回款报表服务器插件.py index 5fbfe35..046a812 100644 --- a/HKBaoBiao/回款报表服务器插件.py +++ b/HKBaoBiao/回款报表服务器插件.py @@ -190,7 +190,7 @@ def BuilderReportSqlAndTempTable(Filter,tableName): SELECT T1.Fid,T1.XiaoShouFid,T1.ShouKuanFid,T1.ShouKuanBillNo ,CAST(ISNULL(T2.̯,0)AS decimal(10,2)) AS '̯' - ,ROW_NUMBER() OVER(PARTITION BY T1.ShouKuanFid ORDER BY T1.ShouKuanFid,XiaoShouFid) AS '̯' + ,ROW_NUMBER() OVER(PARTITION BY T1.ShouKuanFid ORDER BY T1.ShouKuanFid,ShouKuanFDate,XiaoShouFid) AS '̯' ,FORMAT(T1.ShouKuanFDate,'yyyy-MM-dd') AS 'ҵ' ,CAST('' AS VARCHAR(500)) AS 'տϸ' ,CAST('' AS VARCHAR(500)) AS '' @@ -237,7 +237,7 @@ def BuilderReportSqlAndTempTable(Filter,tableName): ,0 AS '' ,ISNULL(T1.FRECAMOUNT,0)-(ISNULL(T1.F_AMOUNT,0)*ISNULL(T1.FEXCHANGERATE,0)) AS '̯' ,'' AS '' - ,T3.FNAME AS 'ͬ' + ,ISNULL(T3.FNAME,'') AS 'ͬ' ,0 AS '' ,0 AS 'һ' ,0 AS 'ʮ' diff --git a/YSZKDZGongNeng_MX/LiteVersionPlugIn2.cs b/YSZKDZGongNeng_MX/LiteVersionPlugIn2.cs index 3f39607..71ab782 100644 --- a/YSZKDZGongNeng_MX/LiteVersionPlugIn2.cs +++ b/YSZKDZGongNeng_MX/LiteVersionPlugIn2.cs @@ -328,15 +328,16 @@ namespace Pilot.Report.Exploitation.AccountsReceivable //{ // continue; //} - + DateTime dateTime; string date = string.IsNullOrWhiteSpace(list[i]["DATE"].ToString()) ? "" : Convert.ToDateTime(list[i]["DATE"].ToString().Split(' ')[0]).ToString("yyyy/M/d"); - string ShipmentsDate = string.IsNullOrWhiteSpace(list[i]["ShipmentsDate"].ToString()) ? "" : string.Join(",",list[i]["ShipmentsDate"].ToString().Split(' ')[0].Split(',').Select(p=>Convert.ToDateTime(p).ToString("yyyy/M/d")).Distinct().ToList()); + //string ShipmentsDate = string.IsNullOrWhiteSpace(list[i]["ShipmentsDate"].ToString()) ? "" : string.Join(",",list[i]["ShipmentsDate"].ToString().Split(' ')[0].Split(',').Select(p=> Convert.ToDateTime(p).ToString("yyyy/M/d")).Distinct().ToList()); string PaymentDate = string.IsNullOrWhiteSpace(list[i]["PaymentDate"].ToString()) ? "" : list[i]["PaymentDate"].ToString().Split(' ')[0]; - string BillingDate = string.IsNullOrWhiteSpace(list[i]["ZPBillingDate"].ToString()) ? "" : string.Join(",", list[i]["ZPBillingDate"].ToString().Split(' ')[0].Split(',').Select(p => Convert.ToDateTime(p).ToString("yyyy/M/d")).Distinct().ToList()); + //string BillingDate = string.IsNullOrWhiteSpace(list[i]["ZPBillingDate"].ToString()) ? "" : string.Join(",", list[i]["ZPBillingDate"].ToString().Split(' ')[0].Split(',').Select(p => Convert.ToDateTime(p).ToString("yyyy/M/d")).Distinct().ToList()); string ReturnDate = string.IsNullOrWhiteSpace(list[i]["ReturnDate"].ToString()) ? "" : list[i]["ReturnDate"].ToString().Split(' ')[0]; //BillingDate += string.IsNullOrWhiteSpace(list[i]["PPBillingDate"].ToString()) ? "" : (string.IsNullOrWhiteSpace(BillingDate) ?"":",")+list[i]["PPBillingDate"].ToString().Split(' ')[0]; - + string ShipmentsDate = string.IsNullOrWhiteSpace(list[i]["ShipmentsDate"].ToString()) ? "" : string.Join(",", list[i]["ShipmentsDate"].ToString().Split(' ')[0].Split(',').Select(p => DateTime.TryParse(p,out dateTime) ? Convert.ToDateTime(p).ToString("yyyy/M/d"): p).Distinct().ToList()); + string BillingDate = string.IsNullOrWhiteSpace(list[i]["ZPBillingDate"].ToString()) ? "" : string.Join(",", list[i]["ZPBillingDate"].ToString().Split(' ')[0].Split(',').Select(p => DateTime.TryParse(p, out dateTime) ? Convert.ToDateTime(p).ToString("yyyy/M/d") : p).Distinct().ToList()); //将合计行放到最下方 IRow rowi = sheet.CreateRow(j + i); //if (list[i]["Number"].ToString() == "合计") diff --git a/派诺报表SQL文件/应收对账单明细更新发票金额存储过程.sql b/派诺报表SQL文件/应收对账单明细更新发票金额存储过程.sql index 4ebfe5b..b409a9f 100644 --- a/派诺报表SQL文件/应收对账单明细更新发票金额存储过程.sql +++ b/派诺报表SQL文件/应收对账单明细更新发票金额存储过程.sql @@ -227,12 +227,12 @@ WHERE B. WHERE A.[ǷK3] = 0 GROUP BY FID - UPDATE A - SET --A.ShippedDebt = B.[ѳǷ],-- A.InvoicedDebt = B.[ѿƱǷ],--A.OwedTickets = B.[ǷƱ], - A.IsEnded = B.[Ƿ] - FROM YingShouZhanKuanMX_GZTH A - INNER JOIN #TEMP4 B ON A.FID = B.FID - WHERE A.[ǷK3] = 0 + --UPDATE A + --SET --A.ShippedDebt = B.[ѳǷ],-- A.InvoicedDebt = B.[ѿƱǷ],--A.OwedTickets = B.[ǷƱ], + --A.IsEnded = B.[Ƿ] + --FROM YingShouZhanKuanMX_GZTH A + --INNER JOIN #TEMP4 B ON A.FID = B.FID + --WHERE A.[ǷK3] = 0 --ѿƱǷ,ѳǷ UPDATE A @@ -282,6 +282,11 @@ WHERE B. FROM YingShouZhanKuanMX_GZTH GROUP BY FID) B ON A.FID = B.FID WHERE A.[ǷK3] = 0 AND A.row_num = 1 + UPDATE A + SET A.IsEnded = CASE WHEN A.OwedTickets = 0 AND A.InvoicedDebt = 0 AND A.ShippedDebt = 0 AND A.OrderAmount = A.ShipmentsAmount THEN '' ELSE 'δ' END + FROM YingShouZhanKuanMX_GZTH A + WHERE A.[ǷK3] = 0 AND A.row_num = 1 + DROP TABLE #TEMP3 DROP TABLE #TEMP4