Tiger.Business.MES/Transaction/YadaPacking.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoParameter.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
Tiger.Business.MES/Transaction/YadaPacking.cs
@@ -12,6 +12,7 @@ using Tiger.Model.Entitys.MES.Position; using Tiger.Business.MES.WorkAction; using Tiger.Model.MES.Yada; using System.Data; namespace Tiger.Business.MES.Transaction { @@ -383,9 +384,20 @@ //设置当前指令为正常产品过站 NodeCmd = "NodeSubmit"; // //获取出货状态 DbClient db = Biz.DataSource["YadaU9C"].Client; ShippingOrder = IsPrintCustomerLabel ? db.Queryable<mes_ShipList>().Where(q => q.MoDoc == CurBatch.WO.ORDER_NO && q.Status == 2 && SqlFunc.DateIsSame(q.BusinessDate, DateTime.Now)).First().ShipDoc : ""; var ship = db.Queryable<mes_ShipList>().Where(q => q.MoDoc == CurBatch.WO.ORDER_NO && q.Status == 2 && SqlFunc.DateIsSame(q.BusinessDate, DateTime.Now)).First(); if (ship.IsNullOrEmpty()) { IsPrintCustomerLabel = false; } else { SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { BATCH = CurBatch.Batch.BATCH_NO, NodeIdOrName = curNode.NODE_NAME }); var list = Biz.Db.Ado.UseStoredProcedure().GetDataTable("SP_MES_GET_NODE_BATCH_COUNT", pars).AsEnumerable().ToList(); if (!list.IsNullOrEmpty()) { var batchCount = list.Where(q => q["ProdDate"].ToString() == "Whole").FirstOrDefault(); IsPrintCustomerLabel = batchCount.IsNullOrEmpty() ? false : batchCount["WaitShipment"].ToInt32() >= ship.ShipQty ? false : true; } } ShippingOrder = IsPrintCustomerLabel ? ship?.ShipDoc ?? "" : ""; //绑定条码到工单 foreach (var wipSN in wipSNs) Tiger.Controllers.MES/Controllers/MESController.BIZ_MES_WO.cs
@@ -264,6 +264,24 @@ return Ok(response); } [HttpPost] [Route("api/[controller]/[action]")] public async Task<IActionResult> GetWoNodeBatchCount([FromBody] ApiAction<GetWoNodeBatchCountInput> action) { ApiAction response = new(); try { SugarParameter[] pars = Biz.Db.Ado.GetParameters(new { BATCH = action.Data.BatchNo, NodeIdOrName=action.Data.NodeName }); var dt = Biz.Db.Ado.UseStoredProcedure().GetDataTable("SP_MES_GET_NODE_BATCH_COUNT", pars); response.Data = dt; } catch (System.Exception ex) { response = response.GetResponse().CatchExceptionWithLog(ex); } return Ok(response); } /// <summary> /// 生成入库获取条码工单信息及包装信息 /// </summary> Tiger.Model.Net/Entitys/MES/ParameterEntity/BizMesWoParameter.cs
@@ -57,4 +57,9 @@ public string wo { get; set; } public string orgCode { get; set; } } public class GetWoNodeBatchCountInput { public string BatchNo { get; set; } public string NodeName { get; set; } } }