1
wtt
2025-04-21 797e02f68d79c931233f25af1d39bc136ce6185d
WebAPI/Controllers/CJGL/Cj_StationInBillController.cs
@@ -389,7 +389,7 @@
                }
                //=========================保存后控制
                //=========================保存后控制  ============================
                DataSet ds2 = oCN.RunProcReturn("Exec h_p_Sc_StationInBill_AfterSaveCtrl " + HInterID.ToString() + ", '" + HBillNo + "',1 ", "h_p_Sc_StationInBill_AfterSaveCtrl");
                if (ds2 == null)
                {
@@ -410,7 +410,7 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //============================
                //=======================================================
                oCN.Commit();
               
@@ -990,8 +990,6 @@
        {
            try
            {
                string ModRightNameCheck = "";
                if (HBillSubType == "SUB")
                {
                    //审核权限
@@ -1046,7 +1044,7 @@
                    return objJsonResult;
                }
                //审核前控制
                //审核前控制==========================================================================
                string HBillNo = oBill.omodel.HBillNo;
                string sql = "exec h_p_Sc_StationInBill_BeforeCheckCtrl " + HInterID + ",'" + HBillNo + "','" + CurUserName + "'";
                ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_BeforeCheckCtrl");
@@ -1067,7 +1065,7 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //=============================================================================
                //审核
                if (Cj_StationInBillCheckBill(HInterID, HBillNo, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo))
                {
@@ -1127,7 +1125,7 @@
                {
                }
                //审核后控制
                //审核后控制=======================================================
                string sql = "exec h_p_Sc_StationInBill_AfterCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'";
                ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_AfterCheckCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
@@ -1142,7 +1140,7 @@
                    oCN.RollBack();
                    return false;
                }
                //====================================================================
                sReturn = sReturn + " 审核功能!";
                oCN.Commit();
                return true;
@@ -1220,7 +1218,7 @@
                    return objJsonResult;
                }
                //反审核前控制
                //反审核前控制=============================================================================
                string HBillNo = oBill.omodel.HBillNo;
                string sql = "exec h_p_Sc_StationInBill_BeforeUnCheckCtrl " + HInterID + ",'" + HBillNo + "','" + CurUserName + "'";
                ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_BeforeUnCheckCtrl");
@@ -1241,7 +1239,7 @@
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //============================================================================================
                //反审核
                if (Cj_StationInBillAbandonCheckBill(HInterID, HBillNo, CurUserName, ref DBUtility.ClsPub.sExeReturnInfo))
                {
@@ -1305,7 +1303,7 @@
                {
                }
                //反审核后控制
                //反审核后控制========================================================================
                string sql = "exec h_p_Sc_StationInBill_AfterUnCheckCtrl " + lngBillKey + ",'" + HBillNo + "','" + CurUserName + "'";
                ds = oCN.RunProcReturn(sql, "h_p_Sc_StationInBill_AfterUnCheckCtrl");
                if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
@@ -1320,7 +1318,7 @@
                    oCN.RollBack();
                    return false;
                }
                //============================================================================================
                sReturn = sReturn + "反审核功能!";
                oCN.Commit();
                return true;
@@ -1420,8 +1418,32 @@
                            return objJsonResult;
                        }
                    }
                    var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                    //关闭前控制=========================================
                    string sql1 = "exec h_p_Sc_ShiftsBeginInfoBill_BeforeCloseCtrl " + HInterID + ",'" +HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Sc_ShiftsBeginInfoBill_BeforeCloseCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "关闭失败!原因:关闭前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        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;
                        return objJsonResult;
                    }
                    //==================================================================================
                    //关闭单据
                    if (!BillOld.CloseBill(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    if (!BillOld.CloseBill(Int64.Parse(HInterID), HBillNo, "h_p_Sc_ShiftsBeginInfoBill_AfterCloseCtrl", user,ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
@@ -1447,8 +1469,32 @@
                            return objJsonResult;
                        }
                    }
                    var HBillNo = ds.Tables[0].Rows[0]["HBillNo"].ToString();
                    //反关闭前控制=========================================
                    string sql1 = "exec h_p_Sc_StationInBill_BeforeUnCloseCtrl " + HInterID + ",'" + HBillNo + "','" + user + "'";
                    ds = oCN.RunProcReturn(sql1, "h_p_Sc_StationInBill_BeforeUnCloseCtrl");
                    if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反关闭失败!原因:反关闭前判断失败,请与网络管理人员联系";
                        objJsonResult.data = null;
                        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;
                        return objJsonResult;
                    }
                    //==================================================================================
                    //反关闭单据
                    if (!BillOld.CancelClose(Int64.Parse(HInterID), ref ClsPub.sExeReturnInfo))
                    if (!BillOld.CancelClose(Int64.Parse(HInterID), HBillNo, "h_p_Sc_StationInBill_AfterUnCloseCtrl", user, ref ClsPub.sExeReturnInfo))
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 1;