From 175c63b06390015e40148dbd8b6065ebff737898 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期一, 07 四月 2025 17:43:43 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs | 490 +++++++++++++++++++++-------------------------------- 1 files changed, 197 insertions(+), 293 deletions(-) diff --git a/WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs b/WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs index 2f5b331..96cff0d 100644 --- a/WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs +++ b/WebAPI/Controllers/XSGL/Xs_ExceptiveCheckRequestBillController.cs @@ -37,23 +37,23 @@ { List<object> columnNameList = new List<object>(); //鏌ョ湅鏉冮檺 - //if (!DBUtility.ClsPub.Security_Log("Gy_ProjectStage_Query", 1, false, user)) - //{ - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; - // objJsonResult.data = null; - // return objJsonResult; - //} + if (!DBUtility.ClsPub.Security_Log("Xs_ExceptiveCheckRequestBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } if (sWhere == null || sWhere.Equals("")) { - ds = oCN.RunProcReturn("select * from h_v_Xs_ExceptiveCheckRequestBillList_Query order by 鍗曟嵁鍙� ", "h_v_Xs_ExceptiveCheckRequestBillList_Query"); + ds = oCN.RunProcReturn("select * from h_v_Xs_ExceptiveCheckRequestBillList_Query order by 鍗曟嵁鍙� desc", "h_v_Xs_ExceptiveCheckRequestBillList_Query"); } else { string sql1 = "select * from h_v_Xs_ExceptiveCheckRequestBillList_Query where 1 = 1 "; - string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� "; + string sql = sql1 + sWhere + " order by 鍗曟嵁鍙� desc"; ds = oCN.RunProcReturn(sql, "h_v_Xs_ExceptiveCheckRequestBillList_Query"); } @@ -217,7 +217,15 @@ } - + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } //淇濆瓨 //淇濆瓨瀹屾瘯鍚庡鐞� @@ -350,6 +358,16 @@ return objJsonResult; } + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + oCN.BeginTran(); oCN.RunProc("delete from Xs_ExceptiveCheckRequestBillMain where HInterID = " + HInterID); @@ -359,7 +377,7 @@ objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "Sucess锛�"; + objJsonResult.Message = "鎮ㄥ凡鍒犻櫎鍗曟嵁鍙蜂负" + BillOld.omodel.HBillNo + "鐨勭壒鎵圭敵璇峰崟锛�"; objJsonResult.data = null; return objJsonResult; } @@ -468,59 +486,95 @@ //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� if (IsAudit == 0) //瀹℃牳鎻愪氦 { - //瀹℃牳鎻愪氦 - //oBill.oCn.BeginTran(); + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + + oCN.BeginTran(); + + //妫�楠屾簮鍗曟槸鍚﹀瓨鍦� + string sql = ""; + if(oBill.omodel.HMainSourceBillType == "1401") + { + sql = "select * from Xs_SeOrderBillMain as a " + + "inner join Xs_SeOrderBillSub as b on a.HInterID = b.HInterID " + + "where a.HInterID = " + oBill.omodel.HMainSourceInterID; + ds = oCN.RunProcReturn(sql, "Xs_SeOrderBill"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-閿�鍞鍗曚笉瀛樺湪!"; + objJsonResult.data = null; + return objJsonResult; + } + else if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-閿�鍞鍗曟湭澶勪簬鍒涘缓鐘舵��!"; + objJsonResult.data = null; + return objJsonResult; + } + } + else if(oBill.omodel.HMainSourceBillType == "1205") + { + sql = "select * from Kf_ICStockBillMain as a " + + "inner join Kf_ICStockBillSub as b on a.HInterID = b.HInterID " + + "where a.HInterID = " + oBill.omodel.HMainSourceInterID; + ds = oCN.RunProcReturn(sql, "Kf_ICStockBill"); + if (ds == null || ds.Tables[0].Rows.Count == 0) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-閿�鍞嚭搴撳崟涓嶅瓨鍦�!"; + objJsonResult.data = null; + return objJsonResult; + } + else if (int.Parse(ds.Tables[0].Rows[0]["HBillStatus"].ToString()) > 1) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-閿�鍞嚭搴撳崟鏈浜庡垱寤虹姸鎬�!"; + objJsonResult.data = null; + return objJsonResult; + } + } + else if (oBill.omodel.HMainSourceBillType == "1425") + { + objJsonResult = AuditXs_ExceptiveCheckRequestBill_CheckSeOrderChangeBill(oBill.omodel.HMainSourceInterID); + if (objJsonResult.code != "1") + { + return objJsonResult; + } + + //鍙嶅啓閿�鍞鍗曟暟鎹� + sql = "exec h_p_IF_SeOrderBill_ReWriteBySeOrderChangeBill " + oBill.omodel.HMainSourceInterID; + oCN.RunProc(sql); + } + else + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟涓嶆槑纭紒!"; + objJsonResult.data = null; + return objJsonResult; + } + + //鍙嶅啓婧愬崟鍗曟嵁鐘舵�� + sql = "exec h_p_Xs_ExceptiveCheckRequestBill_ReWriteSourceStatus " + oBill.omodel.HMainSourceInterID + ",'" + oBill.omodel.HMainSourceBillType + "','" + CurUserName + "'"; + oCN.RunProc(sql); + if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { - //if (oBill.omodel.HMainSourceBillType == "1401") //鑷姩瀹℃牳閿�鍞鍗� - //{ - // objJsonResult = AuditXs_SeOrderBill((int)oBill.omodel.HMainSourceInterID, 0, CurUserName); - // if (objJsonResult.count != 0) - // { - // oBill.oCn.Commit(); - - // objJsonResult.code = "1"; - // objJsonResult.count = 1; - // objJsonResult.Message = "瀹℃牳鎴愬姛"; - // objJsonResult.data = null; - // return objJsonResult; - // } - // else - // { - // //oBill.oCn = new SQLHelper.ClsCN(); - // return objJsonResult; - // } - - //} - //else if (oBill.omodel.HMainSourceBillType == "1205") //鑷姩瀹℃牳閿�鍞嚭搴撳崟 - //{ - // objJsonResult = AuditKf_SellOutBill((int)oBill.omodel.HMainSourceInterID, 0, CurUserName); - // if (objJsonResult.count != 0) - // { - // oBill.oCn.Commit(); - - // objJsonResult.code = "1"; - // objJsonResult.count = 1; - // objJsonResult.Message = "瀹℃牳鎴愬姛"; - // objJsonResult.data = null; - // return objJsonResult; - // } - // else - // { - // //oBill.oCn = new SQLHelper.ClsCN(); - // return objJsonResult; - // } - //} - //else - //{ - // //oBill.oCn = new SQLHelper.ClsCN(); - // objJsonResult.code = "0"; - // objJsonResult.count = 0; - // objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟绫诲瀷閿欒锛�"; - // objJsonResult.data = null; - // return objJsonResult; - //} - + oCN.Commit(); objJsonResult.code = "1"; objJsonResult.count = 1; @@ -530,7 +584,8 @@ } else { - //oBill.oCn = new SQLHelper.ClsCN(); + oCN.RollBack(); + objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; @@ -540,6 +595,18 @@ } if (IsAudit == 1) //鍙嶅鏍告彁浜� { + + //杩涜 浼氳鏈熼棿 缁撹处 鐨勫垽鏂拰鎺у埗 + string s = ""; + int sYear = 0; + int sPeriod = 0; + DateTime HDate = DateTime.Now; + if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(HDate, ref sYear, ref sPeriod, ref s) == false) + { + objJsonResult.Message = s; + return objJsonResult; + } + //鍙嶅鏍告彁浜bandonCheck if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) { @@ -562,6 +629,8 @@ } catch (Exception e) { + oCN.RollBack(); + objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); @@ -570,274 +639,109 @@ } } - #region 瀹℃牳閿�鍞鍗� - public json AuditXs_SeOrderBill(int HInterID, int IsAudit, string CurUserName) + #region 瀹℃牳鐗规壒鐢宠鍗曞弽鍐欓攢鍞鍗曞彉鏇村崟鐘舵�佹暟鎹楠� + public json AuditXs_ExceptiveCheckRequestBill_CheckSeOrderChangeBill(long HInterID) { - string ModRightNameCheck = "Xs_SeOrderBill_Check"; - DBUtility.ClsPub.CurUserName = CurUserName; + try { - //瀹℃牳鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; - objJsonResult.data = null; - return objJsonResult; - } - //HInterID鏁版嵁鍒ゆ柇 - if (HInterID <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟HInterID灏忎簬0锛�"; - objJsonResult.data = null; - return objJsonResult; - } - - Int64 lngBillKey = 0; lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� - DAL.ClsXs_SeOrderBill oBill = new DAL.ClsXs_SeOrderBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� + DAL.ClsXs_SeOrderChangeBill oBill = new DAL.ClsXs_SeOrderChangeBill(); //閿�鍞鍗曞彉鏇村崟瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� + DAL.ClsXs_SeOrderBill oBillSource = new DAL.ClsXs_SeOrderBill(); //閿�鍞鍗曞疄渚嬪寲鍗曟嵁鎿嶄綔绫伙紝鐢ㄤ簬杩涜鐩稿叧鎿嶄綔 //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔 - if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 + if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇閿�鍞鍗曞彉鏇村崟鍗曟嵁鐨勬暟鎹� { - if (oBill.omodel.HCloseMan.Trim() != "") + if (!oBillSource.ShowBill(oBill.DetailColl[0].HSourceInterID, ref DBUtility.ClsPub.sExeReturnInfo)) //鍒ゆ柇閿�鍞鍗曞彉鏇村崟鐨勬簮鍗�-閿�鍞鍗曟槸鍚﹀瓨鍦ㄥ苟鑾峰彇鏁版嵁 { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-閿�鍞鍗曞彉鏇村崟鐨勬簮鍗�-閿�鍞鍗曚笉瀛樺湪!"; objJsonResult.data = null; return objJsonResult; } - if (oBill.omodel.HDeleteMan.Trim() != "") + + + if (oBill.omodel.HBillStatus > 1) { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�"; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-閿�鍞鍗曞彉鏇村崟涓嶄负鈥樺垱寤衡�欑姸鎬侊紒"; objJsonResult.data = null; return objJsonResult; } - if (IsAudit == 0) //瀹℃牳鍒ゆ柇 + + if (oBillSource.omodel.HBillStatus != 2) { - if (oBill.omodel.HChecker.Trim() != "") + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-閿�鍞鍗曞彉鏇村崟鐨勬簮鍗�-閿�鍞鍗曚笉涓衡�樺凡瀹℃牳鈥欑姸鎬侊紒"; + objJsonResult.data = null; + return objJsonResult; + } + + //妫�楠屽瓙琛ㄦ暟鎹� + string errorMessage = ""; + DateTime today = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd")); //褰撴棩鏃ユ湡 + double HRelationQty = 0; //婧愬崟-閿�鍞鍗曞叧鑱旀暟閲�(閿�鍞嚭搴撴暟閲�) + foreach (Model.ClsXs_SeOrderChangeBillSub oSub in oBill.DetailColl) + { + string sql = "select * from Xs_SeOrderBillSub where HInterID = " + oSub.HSourceInterID + " and HEntryID = " + oSub.HSourceEntryID; + ds = oCN.RunProcReturn(sql, "Xs_SeOrderBillSub"); + if (ds.Tables[0].Rows.Count == 0) { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; + errorMessage += "婧愬崟-閿�鍞鍗曞彉鏇村崟锛氱" + oSub.HEntryID + "琛岀墿鏂欏湪婧愬崟-閿�鍞鍗曚腑涓嶅瓨鍦�!"; + } + else + { + //鑾峰彇閿�鍞鍗曞彉鏇村崟涓搴旂墿鏂欏湪婧愬崟-閿�鍞鍗曚腑鐨勫叧鑱旀暟閲� + HRelationQty = double.Parse(ds.Tables[0].Rows[0]["HRelationQty"].ToString()); + + //鍒ゆ柇鐗╂枡鏂版暟閲忔槸鍚﹀皬浜庢簮鍗曞崟鎹腑瀵瑰簲鐗╂枡鐨勫叧鑱旀暟閲� + if (oSub.HQty_New < HRelationQty) + { + errorMessage += "婧愬崟-閿�鍞鍗曞彉鏇村崟锛氱" + oSub.HEntryID + "琛岀墿鏂欐柊鏁伴噺灏忎簬婧愬崟-閿�鍞鍗曡鍏宠仈鏁伴噺!"; + } + //鍒ゆ柇鏂颁氦璐ф棩鏈熸槸鍚︽棭浜庡綋鏃� + if (oSub.HDate_New.CompareTo(today) < 0) + { + errorMessage += "婧愬崟-閿�鍞鍗曞彉鏇村崟锛氱" + oSub.HEntryID + "琛屾柊浜よ揣鏃ユ湡鏃╀簬褰撴棩!"; + } + } } - if (IsAudit == 1) //鍙嶅鏍稿垽鏂� + if (errorMessage != "") { - if (oBill.omodel.HChecker.Trim() == "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!"; - objJsonResult.data = null; - return objJsonResult; - } + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:" + errorMessage; + objJsonResult.data = null; + return objJsonResult; } + + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = null; + objJsonResult.data = null; + return objJsonResult; } else { objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.Message = "瀹℃牳澶辫触!鍘熷洜:婧愬崟-閿�鍞鍗曞彉鏇村崟涓嶅瓨鍦�!"; objJsonResult.data = null; return objJsonResult; } - - - //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� - if (IsAudit == 0) //瀹℃牳鎻愪氦 - { - //瀹℃牳鎻愪氦 - if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "婧愬崟瀹℃牳鎴愬姛"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - if (IsAudit == 1) //鍙嶅鏍告彁浜� - { - //鍙嶅鏍告彁浜bandonCheck - if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "婧愬崟鍙嶅鏍告垚鍔�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - return objJsonResult; } catch (Exception e) { + oCN.RollBack(); + objJsonResult.code = "0"; objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); - objJsonResult.data = null; - return objJsonResult; - } - } - #endregion - - #region 瀹℃牳閿�鍞嚭搴撳崟 - public json AuditKf_SellOutBill(int HInterID, int IsAudit, string CurUserName) - { - string ModRightNameCheck = "Kf_SellOutBill_Check"; - DBUtility.ClsPub.CurUserName = CurUserName; - try - { - //瀹℃牳鏉冮檺 - if (!DBUtility.ClsPub.Security_Log_second(ModRightNameCheck, 1, false, CurUserName)) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触锛佹棤鏉冮檺锛�"; - objJsonResult.data = null; - return objJsonResult; - } - //HInterID鏁版嵁鍒ゆ柇 - if (HInterID <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟HInterID灏忎簬0锛�"; - objJsonResult.data = null; - return objJsonResult; - } - - - Int64 lngBillKey = 0; - lngBillKey = DBUtility.ClsPub.isLong(HInterID); //瀵笻InterID杩涜绫诲瀷鐨勮浆鎹� - DAL.ClsKf_SellOutBill oBill = new DAL.ClsKf_SellOutBill(); //瀹炰緥鍖栧崟鎹搷浣滅被锛岀敤浜庤繘琛岀浉鍏虫搷浣� - - //閽堝闇�瑕佽繘琛岀殑鎿嶄綔锛屾楠屽綋鍓嶅崟鎹殑鐘舵�佹槸鍚︽敮鎸侀渶瑕佽繘琛岀殑鎿嶄綔 - if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo)) //鏍规嵁HInterID鑾峰彇璇ュ崟鎹殑鏁版嵁 - { - if (oBill.omodel.HCloseMan.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸插叧闂�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (oBill.omodel.HDeleteMan.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸蹭綔搴�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - if (IsAudit == 0) //瀹℃牳鍒ゆ柇 - { - if (oBill.omodel.HChecker.Trim() != "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁宸插鏍�!涓嶈兘鍐嶆瀹℃牳锛�"; - objJsonResult.data = null; - return objJsonResult; - } - } - if (IsAudit == 1) //鍙嶅鏍稿垽鏂� - { - if (oBill.omodel.HChecker.Trim() == "") - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁鏈鏍�!涓嶉渶瑕佸弽瀹℃牳!"; - objJsonResult.data = null; - return objJsonResult; - } - } - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍗曟嵁涓嶅瓨鍦�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - - - //杩涜闇�瑕佽繘琛岀殑瀹℃牳/鍙嶅鏍告搷浣� - if (IsAudit == 0) //瀹℃牳鎻愪氦 - { - //瀹℃牳鎻愪氦 - if (oBill.CheckBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "婧愬崟瀹℃牳鎴愬姛"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - if (IsAudit == 1) //鍙嶅鏍告彁浜� - { - //鍙嶅鏍告彁浜bandonCheck - if (oBill.AbandonCheck(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo) == true) - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "婧愬崟鍙嶅鏍告垚鍔�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟鍙嶅鏍稿け璐�!鍘熷洜:" + DBUtility.ClsPub.sExeReturnInfo; - objJsonResult.data = null; - return objJsonResult; - } - } - return objJsonResult; - } - catch (Exception e) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "婧愬崟瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); + objJsonResult.Message = "瀹℃牳澶辫触鎴栬�呭弽瀹℃牳澶辫触锛�" + e.ToString(); objJsonResult.data = null; return objJsonResult; } -- Gitblit v1.9.1