|  |  |  | 
|---|
|  |  |  | ",HSourceID4=" + HSourceID4 + | 
|---|
|  |  |  | ",HSourceID5=" + HSourceID5 + | 
|---|
|  |  |  | ",HPayProcID=" + HPayProcID + | 
|---|
|  |  |  | ",HGroupID=" + HGroupID + | 
|---|
|  |  |  | ",HWorkTimes=" + HWorkTimes + | 
|---|
|  |  |  | ",HSaveBillFlag=0 " + | 
|---|
|  |  |  | ",HBadCount=" + HBadCount + | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | #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 | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|