From 6a2a02e183b0c0a8b01bebd0452bd0ac0bbed445 Mon Sep 17 00:00:00 2001
From: wtt <1985833171@qq.com>
Date: 星期一, 03 十一月 2025 16:26:34 +0800
Subject: [PATCH] 1
---
WebAPI/Controllers/工资管理/HR_EmployeeSkillBillController.cs | 86 +++++++++++++++++++++++++++++++++++++++---
1 files changed, 79 insertions(+), 7 deletions(-)
diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_EmployeeSkillBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_EmployeeSkillBillController.cs"
index 4e207e3..3c8fa84 100644
--- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_EmployeeSkillBillController.cs"
+++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/HR_EmployeeSkillBillController.cs"
@@ -29,8 +29,8 @@
SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
public DAL.ClsHR_EmployeeSkillBill oBill = new DAL.ClsHR_EmployeeSkillBill();
public DAL.ClsHR_EmployeeSkillBill BillNew = new DAL.ClsHR_EmployeeSkillBill(); //瀵瑰簲鍗曟嵁绫�
- public DAL.ClsHR_EmployeeSkillBill BillOld = new DAL.ClsHR_EmployeeSkillBill(); //瀵瑰簲鍗曟嵁绫�
-
+ public DAL.ClsHR_EmployeeSkillBill BillOld = new DAL.ClsHR_EmployeeSkillBill(); //瀵瑰簲鍗曟嵁绫�
+ Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter(); //鑾峰彇绯荤粺鍙傛暟
// HR_EmployeeSkillBill HR_EmployeeSkillBillMain
#region 鍛樺伐鎶�鑳芥竻鍗曞垪琛�
/// <summary>
@@ -108,7 +108,7 @@
//鍒犻櫎鍓嶆帶鍒�=========================================
string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeDelCtrl " + BillOld.omodel.HInterID + ",'" + BillOld.omodel.HBillNo + "','" + HMaker + "'";
- ds = oCn.RunProcReturn(sql1, "h_p_YS_ReceiveOtherBill_BeforeDelCtrl");
+ ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeDelCtrl");
if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -528,8 +528,31 @@
objJsonResult.data = null;
return objJsonResult;
}
+ //浣滃簾鍓嶆帶鍒�=========================================
+ string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
+ ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeDropCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:瀹℃牳鍓嶅垽鏂け璐ワ紝璇蜂笌缃戠粶绠$悊浜哄憳鑱旂郴";
+ objJsonResult.data = null;
+ oCn.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCn.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
//浣滃簾鍗曟嵁
- if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+ if (!oBill.Cancelltion(HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterDropCtrl", HMaker, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -556,8 +579,31 @@
objJsonResult.data = null;
return objJsonResult;
}
+ //鍙嶄綔搴熷墠鎺у埗=========================================
+ string sql1 = "exec h_p_HR_EmployeeSkillBill_BeforeUnDropCtrl " + oBill.omodel.HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
+ ds = oCn.RunProcReturn(sql1, "h_p_HR_EmployeeSkillBill_BeforeUnDropCtrl");
+ if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:鍙嶄綔搴熷墠鍒ゆ柇澶辫触锛岃涓庣綉缁滅鐞嗕汉鍛樿仈绯�";
+ objJsonResult.data = null;
+ oCn.RollBack();
+ return objJsonResult;
+ }
+
+ if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
+ {
+ objJsonResult.code = "0";
+ objJsonResult.count = 1;
+ objJsonResult.Message = "浣滃簾澶辫触!鍘熷洜:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
+ objJsonResult.data = null;
+ oCn.RollBack();
+ return objJsonResult;
+ }
+ //==================================================================================
//鍙嶄綔搴熷崟鎹�
- if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
+ if (!oBill.AbandonCancelltion(HInterID, oBill.omodel.HBillNo, "h_p_HR_EmployeeSkillBill_AfterDropCtrl", HMaker, ref ClsPub.sExeReturnInfo))
{
objJsonResult.code = "0";
objJsonResult.count = 0;
@@ -617,7 +663,7 @@
}
//杩斿洖鍒楄〃淇℃伅
- ds = oCn.RunProcReturn("select * from h_v_HR_EmployeeSkillBillMainList where 1=1 and hmainid=" + HInterID + " order by hmainid desc", "h_v_HR_EmployeeSkillBillMainList");
+ ds = oCn.RunProcReturn("select * from h_v_HR_EmployeeSkillBillMainEdit where 1=1 and hmainid=" + HInterID + " order by hmainid desc", "h_v_HR_EmployeeSkillBillMainEdit");
if (ds == null || ds.Tables[0].Rows.Count == 0)
{
objJsonResult.code = "0";
@@ -787,7 +833,32 @@
bResult = false;
}
if (bResult)
- {
+ {
+ //鑷姩瀹℃牳璁剧疆
+ if (refSav == "Add")
+ {
+ objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D
+ //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ string sReturn = "";
+ if (oSystemParameter.ShowBill(ref sReturn) == true)
+ {
+ if (oSystemParameter.omodel.HR_EmployeeSkillBill_AutoCheck == "Y") //绯荤粺鍙傛暟 鑷姩瀹℃牳
+ {
+ objJsonResult.Verify = "Y";
+ }
+ else
+ {
+ objJsonResult.Verify = "N";
+ }
+ }
+ }
+ else
+ if (refSav == "Update")
+ {
+ objJsonResult.HInterID = oBill.omodel.HInterID.ToString(); //杩斿洖涓籌D
+ objJsonResult.Verify = "N";
+ }
+
objJsonResult.code = "0";
objJsonResult.count = 1;
objJsonResult.Message = "淇濆瓨鎴愬姛锛�";
@@ -802,6 +873,7 @@
objJsonResult.data = 1;
return objJsonResult;
}
+
}
catch (Exception e)
{
--
Gitblit v1.9.1