duhe
2024-03-25 7b852c102e3325c91e0fba94c5315161747af9ed
WebAPI/Controllers/XSGL/YS_ReceiveOtherBillController.cs
@@ -354,7 +354,7 @@
                    return objJsonResult;
                }
                //判断是否是创建状态进行删除
                if (BillOld.omodel.HBillStatus.ToString() == "1")
                if (int.Parse(BillOld.omodel.HBillStatus.ToString()) <= 1)
                {
@@ -540,29 +540,15 @@
                    //记录返回信息
                    string msg = "";
                    if(oBill.omodel.HMainSourceInterID != 0)
                    string sql = "exec h_p_YS_ReceiveOtherBill_CheckCrediControl " + oBill.omodel.HInterID;
                    ds = oCN.RunProcReturn(sql, "h_p_YS_ReceiveOtherBill_CheckCrediControl");
                    if (ds.Tables[0].Rows[0]["HBack"].ToString() == "1")
                    {
                        //检验源单是否存在及单据状态
                        string sql = "select * from YS_ReceiveOtherBillMain where HInterID = " + oBill.omodel.HMainSourceInterID;
                        ds = oCN.RunProcReturn(sql, "YS_ReceiveOtherBillMain");
                        if (ds == null || ds.Tables[0].Rows.Count == 0)
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "审核失败!原因:源单-特批申请单不存在!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        else if (ds.Tables[0].Rows[0]["HBillStatus"].ToString() != "2")
                        {
                            objJsonResult.code = "0";
                            objJsonResult.count = 0;
                            objJsonResult.Message = "审核失败!原因:源单-特批申请单未处于已审核状态!";
                            objJsonResult.data = null;
                            return objJsonResult;
                        }
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "审核失败!原因:" + ds.Tables[0].Rows[0]["HRemark"].ToString();
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    //审核前控制=========================================