yxj
2024-10-11 fa997fd4354db116cfae04f1232779ce0b38f629
考勤汇报单新增修改时根据参数自动审核单据功能修改
3个文件已修改
81 ■■■■ 已修改文件
DAL/工资管理/ClsPay_WorkTimesBill.cs 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebAPI/Controllers/工资管理/Pay_WorkTimesBillController.cs 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DAL/¹¤×ʹÜÀí/ClsPay_WorkTimesBill.cs
@@ -146,9 +146,7 @@
                    oCn.RollBack();
                    return false;
                }
                sReturn = "单据号:"+ omodel.HBillNo+ " ä¿®æ”¹æˆåŠŸï¼";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
@@ -156,7 +154,37 @@
                oCn.RollBack();
                throw (e);
            }
            //审核单据
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBillByOrgID(omodel.HSTOCKORGID, ref sReturn) == false)
            {
                sReturn = "单据号:" + omodel.HBillNo + " ä¿®æ”¹æˆåŠŸï¼Œåˆ¤æ–­æ˜¯å¦è‡ªåŠ¨å®¡æ ¸æ—¶èŽ·å–ç³»ç»Ÿå‚æ•°å¤±è´¥ï¼ " + sReturn;
                return true;
            }
            if (oSystemParameter.omodel.Pay_WorkTimesBill_AutoCheck.ToUpper() == "Y") //系统参数  è‡ªåŠ¨å®¡æ ¸
            {
                //审核单据
                if (!CheckBill(omodel.HInterID, omodel.HBillNo, "h_p_Pay_WorkTimesBill_AfterCheckCtrl", DBUtility.ClsPub.CurUserName, ref DBUtility.ClsPub.sExeReturnInfo))
                {
                    sReturn = "单据号:" + omodel.HBillNo + " ä¿®æ”¹æˆåŠŸï¼Œå®¡æ ¸å¤±è´¥ï¼";
                    return true;
                }
                else
                {
                    sReturn = "单据号:" + omodel.HBillNo + " ä¿®æ”¹å®¡æ ¸æˆåŠŸï¼";
                    return true;
                }
            }
            else
            {
                sReturn = "单据号:" + omodel.HBillNo + " ä¿®æ”¹æˆåŠŸï¼";
                return true;
            }
        }
        //新增单据
        public override bool AddBill(ref string sReturn)
        {
@@ -211,9 +239,7 @@
                    oCn.RollBack();
                    return false;
                }
                sReturn = "单据号:" + omodel.HBillNo + " æ–°å¢žæˆåŠŸï¼";
                oCn.Commit();
                return true;
            }
            catch (Exception e)
            {
@@ -221,6 +247,35 @@
                oCn.RollBack();
                throw (e);
            }
            //审核单据
            //获取系统参数
            Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();
            if (oSystemParameter.ShowBillByOrgID(omodel.HSTOCKORGID, ref sReturn) == false)
            {
                sReturn = "单据号:" + omodel.HBillNo + " æ–°å¢žæˆåŠŸï¼Œåˆ¤æ–­æ˜¯å¦è‡ªåŠ¨å®¡æ ¸æ—¶èŽ·å–ç³»ç»Ÿå‚æ•°å¤±è´¥ï¼ " + sReturn;
                return true;
            }
            if (oSystemParameter.omodel.Pay_WorkTimesBill_AutoCheck.ToUpper() == "Y") //系统参数  è‡ªåŠ¨å®¡æ ¸
            {
                //审核单据
                if (!CheckBill(omodel.HInterID, omodel.HBillNo, "h_p_Pay_WorkTimesBill_AfterCheckCtrl", DBUtility.ClsPub.CurUserName, ref DBUtility.ClsPub.sExeReturnInfo))
                {
                    sReturn = "单据号:" + omodel.HBillNo + " æ–°å¢žæˆåŠŸï¼Œå®¡æ ¸å¤±è´¥ï¼";
                    return true;
                }
                else
                {
                    sReturn = "单据号:" + omodel.HBillNo + " æ–°å¢žå®¡æ ¸æˆåŠŸï¼";
                    return true;
                }
            }
            else
            {
                sReturn = "单据号:" + omodel.HBillNo + " æ–°å¢žæˆåŠŸï¼";
                return true;
            }
        }
        //显示单据
        public override bool ShowBill(Int64 lngBillKey, ref string sReturn)
Pub_Class/CustomerCls/ClsXt_SystemParameter.cs
@@ -3759,7 +3759,14 @@
                        omodel.MES_StationEntrustOutBill_DeleteCtl = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //工资系统参数
                    //==============================考勤汇报单
                    if (ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HKey"]) == "Pay_WorkTimesBill_AutoCheck")
                    {
                        omodel.Pay_WorkTimesBill_AutoCheck = ClsPub.isStrNull(DsSub.Tables[0].Rows[i]["HValue"]);
                    }
                    //=======JIT系统参数
WebAPI/Controllers/¹¤×ʹÜÀí/Pay_WorkTimesBillController.cs
@@ -14,7 +14,6 @@
    public class Pay_WorkTimesBillController : ApiController
    {
        Pub_Class.ClsXt_SystemParameter oSystemParameter = new Pub_Class.ClsXt_SystemParameter();//系统变量
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        public const string ModName = "2203";                   //单据类型
        public const string ModCaption = "考勤汇报单";          //单据名称
@@ -749,14 +748,6 @@
                if (bResult)
                {
                    string sReturn = "";
                    if (oSystemParameter.ShowBill(ref sReturn) == true)
                    {
                        if (oSystemParameter.omodel.MES_StationOutBill_AutoCheck == "Y") //系统参数  è‡ªåŠ¨å®¡æ ¸
                        {
                            object objResult = GetPay_WorkTimesBill_Check_Json(lsmain[0].HInterID,1, HMaker);
                        }
                    }
                    objJsonResult.code = "0";
                    objJsonResult.count = 1;
                    objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo;  //成功!