From a686ad3d52b6887129a27fa4d99e17899a30241f Mon Sep 17 00:00:00 2001 From: chenhaozhe <cgz@hz-kingdee.com> Date: 星期二, 19 八月 2025 16:15:23 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/工资管理/Pay_SalaryCalculateController.cs | 75 +++++++++++++++++++++++++++++++++++++ 1 files changed, 75 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..4b86c75 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" @@ -25,6 +25,58 @@ string user_LongShan = ""; string HName_LongShan = ""; + + #region 宸ヨ祫杩愮畻 + /// <summary> + /// 鏍规嵁寮�濮嬫棩鏈熴�佺粨鏉熸棩鏈熴�佺彮缁勮繘琛屽伐璧勮繍绠� + /// </summary> + /// <returns></returns> + [Route("Pay_SalaryCulateController/GetSalaryCalculate_Json")] + [HttpGet] + public object GetSalaryCalculate_Json(DateTime HBeginDate, DateTime HEndDate, Int64 HGroupID, string HSourceBillType, string HMaker, Int64 HStockOrgID) + { + try + { + ds = oCN.RunProcReturn("exec h_p_Pay_SalaryCalculate '" + HBeginDate + "','" + HEndDate + "'," + HGroupID.ToString() + ",'" + HSourceBillType + "','" + HMaker + "'," + HStockOrgID.ToString(), "h_p_Pay_SalaryCalculate"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "宸ヨ祫杩愮畻鏃跺嚭鐜伴敊璇紝璇烽噸鏂拌繍绠楋紒"; + objJsonResult.data = null; + return objJsonResult; + } + else if (DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HBack"]) == 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 1; + objJsonResult.Message = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HRemark"]); + objJsonResult.data = null; + return objJsonResult; + } + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "宸ヨ祫杩愮畻澶辫触锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + + + #region 宸ヨ祫璁$畻-鏁版嵁鏌ヨ /// <summary> /// 杩斿洖椤圭洰闃舵鍒楄〃 @@ -111,6 +163,17 @@ objJsonResult.Message = "鏃犳柊澧炴潈闄�!"; objJsonResult.data = null; 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); + } } //鑾峰彇宸ュ簭鍑虹珯姹囨姤鍗曟暟鎹� @@ -466,6 +529,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