From 66692fe72e71ba61e7435d7fb258429eee44b8b5 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期日, 24 四月 2022 17:01:34 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/生产管理/报工台工序/Sc_MESBeginStepWorkBillController.cs | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" index 5336397..8a166a1 100644 --- "a/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" +++ "b/WebAPI/Controllers/\347\224\237\344\272\247\347\256\241\347\220\206/\346\212\245\345\267\245\345\217\260\345\267\245\345\272\217/Sc_MESBeginStepWorkBillController.cs" @@ -1467,13 +1467,12 @@ try { //鏍规嵁閫夋嫨璧勬簮ID鑾峰彇褰撳墠鐢熶骇宸ュ崟銆佽矗浠讳汉 - ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where 鍗曟嵁鍙�='"+ sBillBarCode + "'", "h_v_IF_ICMOBillList"); + ds = oCN.RunProcReturn("select * from h_v_IF_ICMOBillList where convert(varchar(50),hmainid)+'-'+convert(varchar(50),HEntryID)='" + sBillBarCode + "'", "h_v_IF_ICMOBillList"); if (ds.Tables[0].Rows.Count > 0) { - objJsonResult.code = "1"; objJsonResult.count = 1; - objJsonResult.Message = "姝ゆ簮鍗曚笉瀛樺湪锛�"; + objJsonResult.Message = "杩斿洖婧愬崟鎴愬姛锛�"; objJsonResult.data = ds; return objJsonResult; } @@ -1526,7 +1525,7 @@ int sPeriod = 0; string BillNo = ""; long MainId = 0; - long EntyID = 0; + string EntyID = ""; if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DateTime.Now, ref sYear, ref sPeriod, ref s) == false) { objJsonResult.code = "0"; @@ -1586,7 +1585,6 @@ if (oBill.omodel.HInterID == 0) { oCN.BeginTran(); - bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); //璁块棶閲戣澏 var loginRet = InvokeHelper.Login(); var isSuccess = JObject.Parse(loginRet)["LoginResultType"].Value<int>(); @@ -1602,8 +1600,8 @@ { //CreateOrgId = 0, Numbers = BillNo, - Ids = MainId, - PkEntryIds = EntyID + Ids = (EntyID).Split('-')[0], + PkEntryIds = (EntyID).Split('-')[1] }; var result = InvokeHelper.ExcuteOperation("PRD_MO", "ToStart", JsonConvert.SerializeObject(json)); if (JObject.Parse(result)["Result"]["ResponseStatus"]["IsSuccess"].ToString().ToUpper() != "TRUE") @@ -1615,6 +1613,8 @@ objJsonResult.data = null; return objJsonResult; } + //鎵ц淇濆瓨 + bResult = oBill.AddBill(ref DBUtility.ClsPub.sExeReturnInfo); if (bResult) { objJsonResult.HInterID = DBUtility.ClsPub.sExeReturnInfo; //杩斿洖涓籌D -- Gitblit v1.9.1