yusijie
2025-06-29 e69d3f70d1c82fdbf5cc0b39f55882a10361c0d6
WebAPI/Controllers/¹¤×ʹÜÀí/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(); //返回主ID
                        //系统参数  è‡ªåŠ¨å®¡æ ¸
                        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(); //返回主ID
                        objJsonResult.Verify = "N";
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = "保存成功!";
@@ -802,6 +873,7 @@
                    objJsonResult.data = 1;
                    return objJsonResult;
                }
            }
            catch (Exception e)
            {