duhe
2025-04-08 5b6d9876d89219f34a2fda2820b1de752d28d77e
WebAPI/Controllers/SBGL/SB_EquipICMOTechParamBillController.cs
@@ -462,23 +462,47 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //关闭单据
                        if (!oBill.CloseBill(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
                        string sql = "";
                        //关闭前控制===============================================Begin===================================================================
                        sql = "exec h_p_Sb_EquipICMOTechParamBill_BeforeCloseCtrl " + HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
                        ds = oCn.RunProcReturn(sql, "h_p_Sb_EquipICMOTechParamBill_BeforeCloseCtrl");
                        if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "关闭失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.Message = "关闭失败!原因:关闭前前判断失败,无返回信息,请与网络管理人员联系";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "关闭失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //关闭前控制===============================================End===================================================================
                        //关闭提交
                        if (oBill.CloseBill(Convert.ToInt32(HInterID), oBill.omodel.HBillNo, "h_p_Sb_EquipICMOTechParamBill_AfterCloseCtrl", HMaker, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                        {
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "关闭成功";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "单据号:" + oBill.omodel.HBillNo + " 关闭成功!";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult; ;
                        }
                            return objJsonResult;
                        }
                    }
                    else
                    {
@@ -490,23 +514,47 @@
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反关闭单据
                        if (!oBill.CancelClose(HInterID, oBill.omodel.HBillNo, HMaker, ref ClsPub.sExeReturnInfo))
                        string sql = "";
                        //反关闭前控制===============================================Begin===================================================================
                        sql = "exec h_p_Sb_EquipICMOTechParamBill_BeforeUnCloseCtrl " + HInterID + ",'" + oBill.omodel.HBillNo + "','" + HMaker + "'";
                        ds = oCn.RunProcReturn(sql, "h_p_Sb_EquipICMOTechParamBill_BeforeUnCloseCtrl");
                        if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "反关闭失败!原因:" + ClsPub.sExeReturnInfo;
                            objJsonResult.Message = "反关闭失败!原因:反关闭前前判断失败,无返回信息,请与网络管理人员联系";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        if (ds.Tables[0].Rows[0]["HBack"].ToString() != "0")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "反关闭失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString(); ;
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        //反关闭前控制===============================================End===================================================================
                        //反关闭提交
                        if (oBill.CancelClose(Convert.ToInt32(HInterID), oBill.omodel.HBillNo, "h_p_Sb_EquipICMOTechParamBill_AfterUnCloseCtrl", HMaker, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                        {
                            objJsonResult.code = "1";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "反关闭成功";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 1;
                            objJsonResult.Message = "单据号:" + oBill.omodel.HBillNo + " 反关闭成功!";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "反关闭失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
                            objJsonResult.data = null;
                            return objJsonResult; ;
                        }
                            return objJsonResult;
                        }
                    }
                }
                else