yusijie
2024-03-12 abf59bc386d65013b4782eb0b3af463457dbe968
WebAPI/Controllers/XSGL/Kf_ICStockBackBillController.cs
@@ -57,14 +57,14 @@
                    ds = oCN.RunProcReturn(sql, "h_v_Kf_ICStockBackBillList_Query");
                }
                if (ds == null || ds.Tables[0].Rows.Count == 0)
                {
                    objJsonResult.code = "0";
                    objJsonResult.count = 0;
                    objJsonResult.Message = "未查询到数据";
                    objJsonResult.data = null;
                    return objJsonResult;
                }
                //if (ds == null || ds.Tables[0].Rows.Count == 0)
                //{
                //    objJsonResult.code = "0";
                //    objJsonResult.count = 0;
                //    objJsonResult.Message = "未查询到数据";
                //    objJsonResult.data = null;
                //    return objJsonResult;
                //}
                //添加列名
                foreach (DataColumn col in ds.Tables[0].Columns)
@@ -346,6 +346,9 @@
                oCN.BeginTran();
                //删除关联
                oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellBack_Delete " + HInterID);
                //删除销售退货单数据
                oCN.RunProc("delete from Kf_ICStockBillMain where HInterID = " + HInterID);
                oCN.RunProc("delete from Kf_ICStockBillSub where HInterID='" + HInterID + "'");
@@ -384,6 +387,7 @@
            }
            catch (Exception e)
            {
                oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "Exception!" + e.ToString();
@@ -509,9 +513,13 @@
                    }
                    //==================================================================================      
                    //oCN.BeginTran();
                    ////增加关联
                    //oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellBack_Check " + HInterID + ",'" + CurUserName + "'");
                    //审核提交
                    if (oBill.CheckBill(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_SellOutBackBill_AfterCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        //oCN.Commit();
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核成功";
@@ -520,6 +528,7 @@
                    }
                    else
                    {
                        //oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
@@ -552,8 +561,12 @@
                    //===========================================================   
                    //反审核提交AbandonCheck
                    //oCN.BeginTran();
                    ////删除关联
                    //oCN.RunProc("exec h_p_Xs_UpDateRelation_SeOrderToSellBack_UnCheck " + HInterID + ",'" + CurUserName + "'");
                    if (oBill.AbandonCheck(oBill.omodel.HInterID, oBill.omodel.HBillNo, "h_p_Kf_SellOutBackBill_AfterUnCheckCtrl", CurUserName, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        //oCN.Commit();
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "反审核成功";
@@ -562,6 +575,7 @@
                    }
                    else
                    {
                        //oCN.RollBack();
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo;
@@ -573,6 +587,7 @@
            }
            catch (Exception e)
            {
                //oCN.RollBack();
                objJsonResult.code = "0";
                objJsonResult.count = 0;
                objJsonResult.Message = "审核失败或者反审核失败!" + e.ToString();