From c5d064d840e01fec1a728204d3776ab831008309 Mon Sep 17 00:00:00 2001 From: yangle <admin@YINMOU> Date: 星期四, 24 十月 2024 14:41:49 +0800 Subject: [PATCH] 15白标生成打印 --- WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs | 71 +++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs index a3d7835..92b3995 100644 --- a/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs +++ b/WebAPI/Controllers/CJGL/Cj_StationOutBillController.cs @@ -444,6 +444,7 @@ ",HSourceID4=" + HSourceID4 + ",HSourceID5=" + HSourceID5 + ",HPayProcID=" + HPayProcID + + ",HGroupID=" + HGroupID + ",HWorkTimes=" + HWorkTimes + ",HSaveBillFlag=0 " + ",HBadCount=" + HBadCount + @@ -3781,5 +3782,75 @@ } } #endregion + + #region 淇濆瓨鐢熸垚鐧芥爣 + public class WhiteLabelGeneration { + public string ProjectNo { get; set; } + public string OrderingCode { get; set; } + public string DrawVersionNumber { get; set; } + public string CustomerOrderNumber { get; set; } + public string WaybillNumber { get; set; } + public string HRemark { get; set; } + public string HBarCode_Pack { get; set; } + public string HBillType { get; set; } + } + [Route("Cj_StationOutBill_Detail/MES_WhiteLabelGeneration")] + [HttpPost] + public object MES_WhiteLabelGeneration([FromBody] JObject oMain) + { + try + { + oCN.BeginTran(); + + var _value = oMain["oMain"].ToString(); + string msg1 = _value.ToString(); + string[] sArray = msg1.Split(new string[] { ";" }, StringSplitOptions.RemoveEmptyEntries); + string msg2 = sArray[0].ToString(); //涓昏〃鏁版嵁 + WhiteLabelGeneration Main = Newtonsoft.Json.JsonConvert.DeserializeObject<WhiteLabelGeneration>(msg2); + + string HBillType = Main.HBillType; + string ProjectNo = Main.ProjectNo; + string OrderingCode = Main.OrderingCode; + string DrawVersionNumber = Main.DrawVersionNumber; + string CustomerOrderNumber = Main.CustomerOrderNumber; + string WaybillNumber = Main.WaybillNumber; + string HRemark = Main.HRemark; + string HBarCode_Pack = Main.HBarCode_Pack; + + ds = oCN.RunProcReturn($"exec h_p_MES_HBarCode_White_SMR_15 '{HBillType}','{ProjectNo}','{OrderingCode}','{DrawVersionNumber}','{CustomerOrderNumber}','{WaybillNumber}','{HRemark}','{HBarCode_Pack}'", "h_p_MES_HBarCode_White_SMR_15"); + + string HBarCode_White = ds.Tables[0].Rows[0]["HBarCode_White"].ToString(); + + if (HBarCode_White == "") + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鐢熸垚鐧芥爣澶辫触,鍗曟嵁鏍囪瘑:" + HBarCode_Pack + "锛�"; + objJsonResult.data = null; + return objJsonResult; + } + + oCN.RunProc("update Sc_PackUnionBillMain set HBarCode_White='" + HBarCode_White + "' where HBarCode_Pack='" + HBarCode_Pack + "'"); + + oCN.Commit(); + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; + } + catch (Exception e) + { + oCN.RollBack(); + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + + #endregion } } \ No newline at end of file -- Gitblit v1.9.1