duhe
2023-11-09 d22bbad221b392dcf606e5cca06f83b3a7b10eb7
WebAPI/Controllers/SCGL/Sc_ICMOChangeBillController.cs
@@ -487,9 +487,26 @@
                        return objJsonResult;
                    }
                    //反写源单数据
                    oCN.BeginTran();
                    string sql = "select * from Sc_ICMOBillSub where HInterID = " + oBill.omodel.HMainSourceInterID + " and HEntryID =" + oBill.omodel.HMainSourceEntryID;
                    ds = oCN.RunProcReturn(sql, "Sc_ICMOBillSub");
                    if(ds==null || ds.Tables[0].Rows.Count == 0)
                    {
                        objJsonResult.code = "0";
                        objJsonResult.count = 0;
                        objJsonResult.Message = "审核失败!原因:源单数据不存在!";
                        objJsonResult.data = null;
                        return objJsonResult;
                    }
                    sql = "update Sc_ICMOBillSub set HQty = " + oBill.DetailColl[0].HQty_New + " where HInterID = " + oBill.omodel.HMainSourceInterID + " and HEntryID =" + oBill.omodel.HMainSourceEntryID;
                    oCN.RunProc(sql);
                    //审核提交
                    if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true)
                    {
                        oCN.Commit();
                        objJsonResult.code = "1";
                        objJsonResult.count = 1;
                        objJsonResult.Message = "审核成功";