From 25c2291ded30737b07fb7c93e5e231cc64733d2a Mon Sep 17 00:00:00 2001
From: chenhaozhe <cgz@hz-kingdee.com>
Date: 星期二, 19 八月 2025 16:15:29 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 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