From df41701bd6f2e21d768f4a4a8e71626e3ca83d0f Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期四, 31 八月 2023 10:47:10 +0800
Subject: [PATCH] 巡检单

---
 WebAPI/Controllers/工资管理/Pay_SalaryCalculateController.cs |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SalaryCalculateController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SalaryCalculateController.cs"
index 1a2a60f..f39f0ed 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SalaryCalculateController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Pay_SalaryCalculateController.cs"
@@ -113,6 +113,17 @@
                     return objJsonResult;
                 }
 
+                ds = oCN.RunProcReturn("select * from Pay_SingleBalBillMain where HAutoCreate = 1 and CONVERT(varchar(100),HDate, 23) >= '" + HBeginDate + "' and CONVERT(varchar(100),HDate, 23) <= '" + HEndDate + "'", "Pay_SingleBalBillMain");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    for(int i = 0; i < ds.Tables[0].Rows.Count; i++)
+                    {
+                        int HInterID = int.Parse(ds.Tables[0].Rows[i]["HInterID"].ToString());
+                        oCN.RunProc("delete from Pay_SingleBalBillMain where HInterID = " + HInterID);
+                        oCN.RunProc("delete from Pay_SingleBalBillSub where HInterID = " + HInterID);
+                    }
+                }
+
                 //鑾峰彇宸ュ簭鍑虹珯姹囨姤鍗曟暟鎹�
                 string sql = "exec h_p_Pay_SalaryCalculate_getData " + HOperatorType + ",'" + HBeginDate + "','" + HEndDate + "'";
                 ds = oCN.RunProcReturn(sql, "h_p_Pay_SalaryCalculate_getData");
@@ -466,6 +477,18 @@
                     objJsonResult.data = null;
                     return objJsonResult;
                 }
+                ds = oCN.RunProcReturn("select * from Pay_GroupBalBillMain where HAutoCreate = 1 and CONVERT(varchar(100),HDate, 23) >= '" + HBeginDate + "' and CONVERT(varchar(100),HDate, 23) <= '" + HEndDate + "'", "Pay_GroupBalBillMain");
+                if (ds.Tables[0].Rows.Count > 0)
+                {
+                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
+                    {
+                        int HInterID = int.Parse(ds.Tables[0].Rows[i]["HInterID"].ToString());
+                        oCN.RunProc("delete from Pay_GroupBalBillMain where HInterID = " + HInterID);
+                        oCN.RunProc("delete from Pay_GroupBalBillSub where HInterID = " + HInterID);
+                        oCN.RunProc("delete from Pay_GroupBalBillEmp where HInterID = " + HInterID);
+                    }
+                }
+
 
 
                 //鑾峰彇宸ュ簭鍑虹珯姹囨姤鍗曟暟鎹�

--
Gitblit v1.9.1