From 248480fdc506ca158db89617d2440dd5702f7e69 Mon Sep 17 00:00:00 2001 From: ch <37327@LLOOCCY> Date: 星期四, 14 四月 2022 09:29:36 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs | 78 ++++++++++++++++++++++++++++++++++++++- 1 files changed, 76 insertions(+), 2 deletions(-) diff --git a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs index 2185301..b076c66 100644 --- a/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs +++ b/WebAPI/Controllers/CGGL/Cg_POOrderBillController.cs @@ -32,8 +32,29 @@ { try { - //鍒ゆ柇鏄惁鏈夐噰璐粡鐞嗘潈闄� - bool isCgjl = Security_Log("Cg_POOrderBill_PurchasManager", 1, false, user); + //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄� + + //if (!DBUtility.ClsPub.Security_Log("Cg_POOrderBillQuery", 1, false, user)) + //{ + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "鏃犳潈闄愭煡鐪�!"; + // objJsonResult.data = null; + // return objJsonResult; + //} + //string sql = "select * from h_v_IF_POOrderBillList where 1 = 1 "; + + //if (sWhere=="" || sWhere == null) + //{ + // ds = oCN.RunProcReturn(sql+ " order by hmainid desc", "h_v_IF_POOrderBillList"); + //} + //else + //{ + // ds = oCN.RunProcReturn(sql + sWhere+ " order by hmainid desc", "h_v_IF_POOrderBillList"); + //} + + //鍒ゆ柇鏄惁鏈夐噰璐粡鐞嗘潈闄愶紙瀹夌憺锛� + bool isCgjl = Security_Log("Cg_POOrderBill_PurchasManager", 1, true, user); if (!isCgjl) { sWhere += $" and HEmpID in (select HEmpID from Gy_Czygl where Czymc='{user}' )"; @@ -173,6 +194,59 @@ } + /// <summary> + /// 閲囪喘璁㈠崟閲嶆柊鍚屾 + ///鍙傛暟锛歴tring sql銆� + ///杩斿洖鍊硷細object銆� + /// </summary> + [Route("Cg_POOrderBill/Resynchronize")] + [HttpGet] + public object Resynchronize(string HBillNo,string HBillType) + { + try + { + oCN.BeginTran(); + SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); + DataSet DS = oCn.RunProcReturn("exec h_p_WMS_ERPSourceBillToLocal '" + HBillNo + "','"+ HBillType + "'", "h_p_WMS_ERPSourceBillToLocal"); + if (DS == null) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鍗曟嵁鍚屾澶辫触"; + objJsonResult.data = null; + return objJsonResult; + } + else + { + if (DBUtility.ClsPub.isStrNull(DS.Tables[0].Rows[0]["HBack"]) == "2") + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "ERP涓笉瀛樺湪璇ュ崟鎹彿"; + 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 = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + [Route("POOrderBack")] [HttpGet] /// <summary> -- Gitblit v1.9.1