From 85ce19ff0847fb3c54ec8844468f33e6011fc8fa Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期五, 03 三月 2023 15:25:40 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 66 +++++++++++++++++++++++++++++++++ 1 files changed, 66 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs index e0d73c1..9412611 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs @@ -1220,6 +1220,72 @@ } #endregion + #region 鏍规嵁鍗曟嵁鍙� 鍚屾鎶ラ敊鍒犻櫎鍑虹珯鍗� + [Route("Cj_StationOutBill/DelStationOutBill")] + [HttpGet] + public object DelStationOutBill(string HInterID) + { + try + { + DAL.ClsSc_StationOutBill oBill = new DAL.ClsSc_StationOutBill(); + + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + + DataTable DTable; + int num = 0; + //鍒ゆ柇鍏ュ簱鏄惁鍚屾 + DTable = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HInterID='" + HInterID + "' and HRelationQty=0", "Sc_StationOutBillMain").Tables[0]; + if (DTable.Rows.Count != 0) + { + num++; + } + //鍒ゆ柇鏈鎶ュ簾鏄惁鍚屾 + DTable = oCN.RunProcReturn("select * from Sc_StationOutBillMain where HProcExchInterID='" + DTable.Rows[0]["HProcExchInterID"].ToString() + "' and HBFFlag=0 ", "Sc_StationOutBillMain").Tables[0]; + if (DTable.Rows.Count != 0) + { + num++; + } + + if (num == 2) + { + if (!oBill.DeleteBill(long.Parse(HInterID), 0, 0, ref DBUtility.ClsPub.sExeReturnInfo)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = DBUtility.ClsPub.sExeReturnInfo; + objJsonResult.data = null; + return objJsonResult; + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鍒犻櫎鎴愬姛锛�"; + objJsonResult.data = null; + return objJsonResult; + } + } + else + { + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "鏃犻』鍒犻櫎锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + } + catch (Exception e) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "寮傚父锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 缂栬緫鍓嶅垽鏂� [Route("Cj_StationOutBill/set_ShowBillJudge")] [HttpGet] -- Gitblit v1.9.1