From 3ababf3e326de4a1f6f49b8567b5ff9949f86f42 Mon Sep 17 00:00:00 2001 From: "songnan.zhang" Date: Tue, 29 Mar 2022 21:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=80=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj | 1 + APPQ5/QMAPP.FJC.BLL/TianJin/TJWorkOrderBLL.cs | 667 ++++++++++ APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj | 1 + APPQ5/QMAPP.FJC.DAL/TianJin/TJWorkOrderDAL.cs | 6 +- APPQ5/QMAPP.FJC.DAL/TianJin/TWorkOrderDAL.cs | 1116 +++++++++++++++++ APPQ5/QMAPP.FJC.Entity/TianJin/TJWorkOrder.cs | 4 + APPQ5/QMAPP.WinForm/App.config | 14 +- .../Forms/Operation/OperationForm.cs | 8 +- .../Forms/TianJin/TJFrmItemList.cs | 37 +- .../Forms/TianJin/TJPastCard.rpt | Bin 32768 -> 32768 bytes .../TianJin/TJPrintPlanLabel.Designer.cs | 89 +- .../Forms/TianJin/TJPrintPlanLabel.cs | 20 +- .../Forms/TianJin/TJPrintPlanLabel.resx | 3 - .../QMAPP.WinForm/Properties/AssemblyInfo.cs | 4 +- .../App_Data/FJCServiceList.xml | 7 + .../WCF/QMFrameWork.WebServiceHost/Web.config | 4 +- 16 files changed, 1909 insertions(+), 72 deletions(-) create mode 100644 APPQ5/QMAPP.FJC.BLL/TianJin/TJWorkOrderBLL.cs create mode 100644 APPQ5/QMAPP.FJC.DAL/TianJin/TWorkOrderDAL.cs diff --git a/APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj b/APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj index 67d9f36..e5da0f1 100644 --- a/APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj +++ b/APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj @@ -190,6 +190,7 @@ + diff --git a/APPQ5/QMAPP.FJC.BLL/TianJin/TJWorkOrderBLL.cs b/APPQ5/QMAPP.FJC.BLL/TianJin/TJWorkOrderBLL.cs new file mode 100644 index 0000000..5d369fd --- /dev/null +++ b/APPQ5/QMAPP.FJC.BLL/TianJin/TJWorkOrderBLL.cs @@ -0,0 +1,667 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMAPP.BLL; +using QMAPP.FJC.Entity.ProductionPlan; +using QMAPP.FJC.DAL.ProductionPlan; +using QMFrameWork.Data; +using QMAPP.Entity; +using System.Data; +using QMAPP.FJC.Entity.Operation; +using QMAPP.FJC.Entity.FIS; +using QMAPP.FJC.DAL.TianJin; +using QMAPP.FJC.Entity.TianJin; + +namespace QMAPP.FJC.BLL.TianJin +{ + /// + /// 模块名称:派工单 + /// 作 者:张鹏 + /// 编写日期:2017年10月24日 + /// + public class TJWorkOrderBLL : BaseBLL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// 信息 + public WorkOrder Get(WorkOrder info) + { + try + { + return new TWorkOrderDAL().Get(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(WorkOrder condition, DataPage page) + { + try + { + return new TWorkOrderDAL().GetList(condition, page); + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 获取指定工序的生产计划清单 + /// + /// 工序编码 + /// 过滤选项:0全部;1隐藏挂起;2只看挂起 + /// + public List GetOrderInCell(string workcellcode,int filter, DataPage dataPage) + { + try + { + return new TWorkOrderDAL().GetOrderInCell(workcellcode,filter,dataPage.PageSize); + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// + /// + /// + /// + public List GetOrderInfo(string orderplanno) + { + try + { + return new TWorkOrderDAL().GetWorkOrderInfo(orderplanno); + } + catch (Exception ex) + { + throw ex; + } + } + + public List GetOrderUnPrinted(string RouteCode, int filter, DataPage dataPage,string Direction) + { + try + { + return new TWorkOrderDAL().GetOrderUnPrinted(RouteCode, Direction, filter, dataPage.PageSize); + } + catch (Exception ex) + { + throw ex; + } + } + + public int SetOrderPrinted(string orderpid) + { + try + { + return new TWorkOrderDAL().SetOrderPrinted(orderpid); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取指定工序下待完成计划数量 + /// + /// 工序编码 + /// 班次 + /// 日期 + /// + public int GetOrderCountInCell(string workcellcode, string shift) + { + try + { + var date = DateTime.Now; + return new TWorkOrderDAL().GetOrderCountInCell(workcellcode, shift, date); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取工作中心当日的总计划数量 + /// + /// 工作中心 + /// + public int GetDayPlanCount(string workcentercode) + { + try + { + var date = DateTime.Now; + return new TWorkOrderDAL().GetDayPlanCount(workcentercode, date); + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取计划标签数据 + /// + /// + /// + public Entity.View.PlanLabel GetPlanLabel(string workorderid) + { + Entity.View.PlanLabel labeldata = new Entity.View.PlanLabel(); + TWorkOrderDAL dal = new TWorkOrderDAL(); + var order = dal.Get(new WorkOrder { PID = workorderid }); + if (order == null) + { + throw new Exception("获取工单信息失败!"); + } + + labeldata.BOM = order.PBOM_CODE; + labeldata.PN = order.MATERIAL_CODE; + labeldata.SEQ = order.SEQ; + labeldata.PlanDate = order.PLAN_DATE.ToString("yyyy-MM-dd HH:mm:ss"); + switch (order.ORDER_TYPE) + { + case "0": + { + labeldata.PlanType = "FIS"; + break; + } + case "1": + { + labeldata.PlanType = "STOCK"; + break; + } + case "2": + { + labeldata.PlanType = "INSERT"; + break; + } + } + var plandal = new DAL.FIS.OrderPlanDAL(); + var plan = plandal.Get(new Entity.FIS.OrderPlan { PID = order.ORDERPLANID }); + if (plan == null) + { + throw new Exception("获取计划信息异常!"); + } + labeldata.PlanNo = plan.PLAN_NO; + + + if (order.ORDER_TYPE == "0") + { + var fisdal = new DAL.FIS.FISOrderDAL(); + var fis = fisdal.GetByPlan(plan.PLAN_NO, plan.MATERIAL_CODE); + if (fis == null) + { + throw new Exception("获取FIS信息异常!"); + } + labeldata.VIN = fis.VIN; + labeldata.KIN = fis.KIN; + } + else + { + labeldata.VIN = "N/A"; + labeldata.KIN = "N/A"; + } + var materialdal = new MD.DAL.MaterialDAL(); + var material = materialdal.Get(new MD.Entity.Material { MATERIAL_CODE = order.MATERIAL_CODE }); + if (material == null) + { + throw new Exception("获取物料信息异常!"); + } + labeldata.HBType = material.HBTYPE; + labeldata.ProjectCode = material.PROJECTCODE; + labeldata.Color = material.COLOR; + labeldata.ProdName = material.MATERIAL_NAME; + return labeldata; + } + + /// + /// 获取计划标签数据 + /// + /// + /// + public Entity.View.PlanLabel GetPlanLabelBindProdut(Product Product) + { + Entity.View.PlanLabel labeldata = new Entity.View.PlanLabel(); + + var plandal = new DAL.FIS.OrderPlanDAL(); + var plan = plandal.Get(new Entity.FIS.OrderPlan { PID = Product.PLAN_ID }); + if (plan == null) + { + throw new Exception("获取计划信息异常!"); + } + labeldata.BOM = plan.PBOM_CODE; + labeldata.PN = plan.MATERIAL_CODE; + + labeldata.PlanDate = plan.PLAN_DATE.ToString("yyyy-MM-dd HH:mm:ss"); + + TWorkOrderDAL dal = new TWorkOrderDAL(); + var order = dal.GetOneByProduct(Product.PRODUCTCODE); + if (order != null) + { + labeldata.SEQ = order.SEQ; + } + else + { + labeldata.SEQ = "N/A"; + } + switch (plan.PLANSOURCE) + { + case "0": + { + labeldata.PlanType = "FIS"; + break; + } + case "1": + { + labeldata.PlanType = "STOCK"; + break; + } + case "2": + { + labeldata.PlanType = "INSERT"; + break; + } + } + + labeldata.PlanNo = plan.PLAN_NO; + + + if (plan.PLANSOURCE == "0") + { + var fisdal = new DAL.FIS.FISOrderDAL(); + var fis = fisdal.GetByPlan(plan.PLAN_NO, plan.MATERIAL_CODE); + if (fis == null) + { + throw new Exception("获取FIS信息异常!"); + } + labeldata.VIN = fis.VIN; + labeldata.KIN = fis.KIN; + } + else + { + labeldata.VIN = "N/A"; + labeldata.KIN = "N/A"; + } + var materialdal = new MD.DAL.MaterialDAL(); + var material = materialdal.Get(new MD.Entity.Material { MATERIAL_CODE = plan.MATERIAL_CODE }); + if (material == null) + { + throw new Exception("获取物料信息异常!"); + } + labeldata.HBType = material.HBTYPE; + labeldata.ProjectCode = material.PROJECTCODE; + labeldata.Color = material.COLOR; + labeldata.ProdName = material.MATERIAL_NAME; + return labeldata; + } + + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// 信息 + /// true:已存在;fasel:不存在。 + public bool Exists(WorkOrder info) + { + try + { + return new TWorkOrderDAL().Exists(info); + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public DataResult Insert(WorkOrder info) + { + DataResult result = new DataResult(); + try + { + if (string.IsNullOrWhiteSpace(info.PID)) + { + info.PID = Guid.NewGuid().ToString(); + } + TWorkOrderDAL cmdDAL = new TWorkOrderDAL(); + result.Result = new TWorkOrderDAL().Insert(info); + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// 信息 + /// 更新行数 + public DataResult Update(WorkOrder info) + { + DataResult result = new DataResult(); + try + { + result.Result = new TWorkOrderDAL().Update(info); + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + /// + /// 挂起工单 + /// + /// + public int SuspendOrder(List orderid) + { + var orders = GetListByID(orderid.ToArray()); + foreach (var order in orders) + { + if (int.Equals(order.STATE, 2)) + { + throw new Exception("不可将状态为执行中的工单挂起!"); + } + order.STATE = 4; + } + var dal = new TWorkOrderDAL(); + return dal.Update(orders); + } + /// + /// 取消挂起 + /// + /// + /// + public int CancelSuspend(List orderid) + { + var orders = GetListByID(orderid.ToArray()); + foreach (var order in orders) + { + if (!int.Equals(order.STATE, 4)) + { + throw new Exception("只可取消状态为挂起状态的工单!"); + } + order.STATE = 1; + } + var dal = new TWorkOrderDAL(); + return dal.Update(orders); + } + /// + /// 回收工单 + /// + /// + /// + public int TakeBack(List orderid) + { + var orders = GetListByID(orderid.ToArray()); + foreach (var order in orders) + { + if (!int.Equals(order.STATE, 4)) + { + throw new Exception("只可回收状态为挂起状态的工单!"); + } + //order.ORDER_TYPE = "1"; + order.PRI = 1; + order.STATE = 0; + } + var dal = new TWorkOrderDAL(); + return dal.Update(orders); + } + /// + /// 重置工单 + /// + /// + /// + public int ResetOrder(List orderid) + { + var orders = GetListByID(orderid.ToArray()); + var first = orders.FirstOrDefault(); + if (first != null) + { + QMAPP.MD.DAL.WorkCellDAL workCelldal = new QMAPP.MD.DAL.WorkCellDAL(); + string pbomcode = first.PBOM_CODE; + QMAPP.MD.Entity.ProcessRouteWorkCellSeq workcell = workCelldal.GetFirstWorkCell(pbomcode).FirstOrDefault(); + foreach (var order in orders) + { + if (!int.Equals(order.STATE, 4)) + { + throw new Exception("只可重置状态为挂起状态的工单!"); + } + //order.ORDER_TYPE = "1"; + order.WORKCELL_CODE = workcell.WORKCELL_CODE; + order.PRI = 1; + order.STATE = 0; + } + var dal = new TWorkOrderDAL(); + return dal.Update(orders); + } + return 0; + } + + /// + /// 忽略FIS断号 + /// + /// + /// + public int IgnoreFISBreak(List orderid) + { + var orders = GetListByID(orderid.ToArray()); + var first = orders.FirstOrDefault(); + var plans = new List(); + var plandal = new DAL.FIS.OrderPlanDAL(); + foreach (var order in orders) + { + if (!int.Equals(order.ORDER_TYPE, "0")) + { + throw new Exception("只可对FIS工单进行忽略断号操作!"); + } + var plan = plandal.Get(new OrderPlan { PID = order.ORDERPLANID }); + if (plan != null) + { + plan.IGNORE_FISBREAK = "1"; + plandal.Update(plan); + plans.Add(plan); + } + } + return plans.Count; + + } + /// + /// 删除工单 + /// + /// + /// + public int DeleteOrder(List orderid) + { + var orders = GetListByID(orderid.ToArray()); + foreach (var order in orders) + { + if (!int.Equals(order.STATE, 4)) + { + throw new Exception("只可删除状态为挂起状态的工单!"); + } + //order.STATE = 1; + } + var dal = new TWorkOrderDAL(); + return dal.Delete(orders); + } + + + /// + /// 根据主键获取列表 + /// + /// + /// + private List GetListByID(params string[] orderid) + { + var dal = new TWorkOrderDAL(); + return dal.GetListByID(orderid); + } + + #endregion + + #region 删除 + /// + /// 删除信息 + /// + /// 主键串 + /// 删除个数 + public DataResult DeleteArray(string strs) + { + int count = 0; + DataResult result = new DataResult(); + string[] list = strs.Split(":".ToCharArray()); + try + { + foreach (string str in list) + { + count += this.Delete(new WorkOrder { PID = str }); + } + result.Result = count; + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 删除信息 + /// + /// 信息 + /// 删除个数 + public int Delete(WorkOrder info) + { + try + { + return new TWorkOrderDAL().Delete(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导出数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(WorkOrder info) + { + try + { + return new TWorkOrderDAL().GetExportData(info); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 导入数据 + /// + /// 导入数据 + /// + /// 数据 + /// 导入结果 + public DataResult ImportData(List list) + { + DataResult result = new DataResult(); + TWorkOrderDAL cmDal = new TWorkOrderDAL(); + List List = new List(); + int index = 0; + try + { + result.Result = new ImportMessage(); + result.Result.Errors = new List(); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //状态判断 + foreach (WorkOrder ma in list) + { + index++; + if (!string.IsNullOrEmpty(ma.InfoError)) + { + ma.PID = null; + result.Result.failureNum += 1; + continue; + } + //修改改时根据主键等信息获取详细内容信息 + WorkOrder oldInfo = cmDal.Get(ma); + if (oldInfo != null) + { + //更新 + ma.PID = oldInfo.PID; + ma.IsNewInfo = false; + result.Result.updateNum += 1; + } + else + { + //新增 + oldInfo = new WorkOrder(); + if (string.IsNullOrWhiteSpace(ma.PID)) + { + ma.PID = Guid.NewGuid().ToString(); + } + ma.IsNewInfo = true; + result.Result.insertNum += 1; + } + List.Add(ma); + } + } + //导入 + cmDal.GetImportData(List); + result.Msg = "导入成功"; + result.IsSuccess = true; + return result; + } + catch (Exception ex) + { + result.IsSuccess = false; + result.Ex = ex; + return result; + } + } + #endregion + } +} diff --git a/APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj b/APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj index e8ca8d5..5cf245c 100644 --- a/APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj +++ b/APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj @@ -180,6 +180,7 @@ + diff --git a/APPQ5/QMAPP.FJC.DAL/TianJin/TJWorkOrderDAL.cs b/APPQ5/QMAPP.FJC.DAL/TianJin/TJWorkOrderDAL.cs index 48331ac..09ea74c 100644 --- a/APPQ5/QMAPP.FJC.DAL/TianJin/TJWorkOrderDAL.cs +++ b/APPQ5/QMAPP.FJC.DAL/TianJin/TJWorkOrderDAL.cs @@ -332,7 +332,7 @@ namespace QMAPP.FJC.DAL.TianJin /// 数量 /// 过滤选项:0全部;1隐藏挂起;2只看挂起 /// - public List GetOrderUnPrinted(string routecode, int filter = 0, int count = 20) + public List GetOrderUnPrinted(string routecode, string Direction, int filter = 0, int count = 20) { try { @@ -371,6 +371,10 @@ namespace QMAPP.FJC.DAL.TianJin sql.AppendFormat(" ON W.[MATERIAL_CODE]=M.[MATERIAL_CODE] "); sql.AppendFormat(" WHERE P.[ROUTE_CODE]=@routecode "); sql.AppendFormat(" AND W.[PRINTED]='0' "); + if (!string.IsNullOrEmpty(Direction)) + { + sql.AppendFormat($" AND M.[MATERIAL_NAME] like '%{Direction}%' "); + } switch (filter) { case 1: diff --git a/APPQ5/QMAPP.FJC.DAL/TianJin/TWorkOrderDAL.cs b/APPQ5/QMAPP.FJC.DAL/TianJin/TWorkOrderDAL.cs new file mode 100644 index 0000000..7f40761 --- /dev/null +++ b/APPQ5/QMAPP.FJC.DAL/TianJin/TWorkOrderDAL.cs @@ -0,0 +1,1116 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using QMFrameWork.Data; +using QMAPP.FJC.Entity.ProductionPlan; +using System.Data; +using QMAPP.Entity; +using QMAPP.DAL; +using QMFrameWork.Log; +using QMAPP.FJC.Entity.FIS; + +namespace QMAPP.FJC.DAL.TianJin +{ + /// + /// 模块名称:派工单 + /// 作 者:张鹏 + /// 编写日期:2017年10月24日 + /// + public class TWorkOrderDAL : BaseDAL + { + + #region 获取信息 + /// + /// 获取信息 + /// + /// 条件 + /// *信息 + public WorkOrder Get(WorkOrder info) + { + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + info = session.Get(info); + } + return info; + } + catch (Exception ex) + { + throw ex; + } + } + public WorkOrder GetOne(string ORDERPLANID) + { + string sql = "SELECT * FROM [T_PP_WORKORDER] WITH(NOLOCK) where [ORDERPLANID]='" + ORDERPLANID + "'"; + List parameters = new List(); + try + { + if (BaseSession != null) + { + return BaseSession.GetList(sql, parameters.ToArray()).FirstOrDefault(); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).FirstOrDefault(); + } + } + catch (Exception ex) + { + throw ex; + } + } + + public WorkOrder GetOneByID(string id) + { + string sql = "SELECT * FROM [T_PP_WORKORDER] WITH(NOLOCK) where [PID]='" + id + "'"; + List parameters = new List(); + try + { + if (BaseSession != null) + { + return BaseSession.GetList(sql, parameters.ToArray()).FirstOrDefault(); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).FirstOrDefault(); + } + } + catch (Exception ex) + { + throw ex; + } + } + + public WorkOrder GetOneByOrderNO(string ORDERPLANNO) + { + string sql = "SELECT * FROM [T_PP_WORKORDER] WITH(NOLOCK) where [ORDERPLAN_NO]='" + ORDERPLANNO + "'"; + List parameters = new List(); + try + { + if (BaseSession != null) + { + return BaseSession.GetList(sql, parameters.ToArray()).FirstOrDefault(); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).FirstOrDefault(); + } + } + catch (Exception ex) + { + throw ex; + } + } + + public WorkOrder GetOneByProduct(string productCode) + { + string sql = "SELECT * FROM [T_PP_WORKORDER] WITH(NOLOCK) where [REMARK]='" + productCode + "'"; + List parameters = new List(); + try + { + if (BaseSession != null) + { + return BaseSession.GetList(sql, parameters.ToArray()).FirstOrDefault(); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql, parameters.ToArray()).FirstOrDefault(); + } + } + catch (Exception ex) + { + throw ex; + } + } + + + /// + /// 获取计划单号下所有派工单信息 + /// + /// + /// + public int GetAllWorkOrder(string ORDERPLANID) + { + int count = 0; + string sql = "SELECT COUNT(1) FROM [T_PP_WORKORDER] WITH(NOLOCK) where [ORDERPLANID]='" + ORDERPLANID + "' AND STATE<>0"; + List parameters = new List(); + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count =Convert.ToInt32(session.ExecuteSqlScalar(sql, parameters.ToArray())); + } + } + catch (Exception ex) + { + throw ex; + } + return count; + } + #endregion + + #region 获取列表 + /// + /// 获取列表 + /// + /// 条件 + /// 数据页 + /// 数据页 + public DataPage GetList(WorkOrder condition, DataPage page) + { + string sql = null; + List parameters = new List(); + try + { + sql = this.GetQuerySql(condition, ref parameters); + //分页关键字段及排序 + page.KeyName = "PID"; + if (string.IsNullOrEmpty(page.SortExpression)) + page.SortExpression = "UPDATEDATE DESC"; + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + page = session.GetDataPage(sql, parameters.ToArray(), page); + } + return page; + } + catch (Exception ex) + { + throw ex; + } + } + + public List GetList(WorkOrder condition) + { + List workOrderList = new List(); + string sql = "select * from T_PP_WORKORDER WITH(NOLOCK) where 1=1 "; + if (string.IsNullOrEmpty(condition.ORDERPLANID) == false) + { + sql += string.Format(" and ORDERPLANID='{0}'",condition.ORDERPLANID); + } + + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + workOrderList = session.GetList(sql, new List().ToArray()).ToList(); + } + + return workOrderList; + } + + + public List GetWorkOrderInfo(string planno) + { + try + { + StringBuilder sql = new StringBuilder(); + sql.AppendFormat("SELECT W.[PID]"); + sql.AppendFormat(" ,W.[ORDERPLANID] "); + sql.AppendFormat(" ,W.[ORDERPLAN_NO] "); + sql.AppendFormat(" ,W.[ORDER_TYPE] "); + sql.AppendFormat(" ,W.[SEQ] "); + sql.AppendFormat(" ,W.[MATERIAL_CODE] "); + sql.AppendFormat(" ,M.[MATERIAL_NAME] "); + sql.AppendFormat(" ,W.[PBOM_CODE] "); + sql.AppendFormat(" ,W.[QTY] "); + sql.AppendFormat(" ,W.[COMPLETE_QTY] "); + sql.AppendFormat(" ,W.[PLAN_DATE] "); + sql.AppendFormat(" ,W.[SHIFT_CODE] "); + sql.AppendFormat(" ,W.[WORKCENTER_CODE] "); + sql.AppendFormat(" ,W.[WORKCENTER_NAME] "); + sql.AppendFormat(" ,W.[WORKCELL_CODE] "); + sql.AppendFormat(" ,W.[WORKCELL_NAME] "); + sql.AppendFormat(" ,W.[WORKLOC_CODE] "); + sql.AppendFormat(" ,W.[REMARK] "); + sql.AppendFormat(" ,W.[EQPT_NAME] "); + sql.AppendFormat(" ,W.[EQPT_CODE] "); + sql.AppendFormat(" ,W.[STATE] "); + sql.AppendFormat(" ,W.[MOULD_CODE] "); + sql.AppendFormat(" ,W.[PRI] "); + sql.AppendFormat(" ,W.[UPDATEDATE] "); + sql.AppendFormat(" ,W.[PRINTED] "); + sql.AppendFormat(" ,P.[IGNORE_FISBREAK] "); + sql.AppendFormat(" ,P.[FIS_ASMSETCODE] "); + sql.AppendFormat(" FROM [T_PP_WORKORDER] AS W WITH(NOLOCK) "); + sql.AppendFormat(" LEFT JOIN [T_PP_ORDERPLAN] AS P WITH(NOLOCK) "); + sql.AppendFormat(" ON P.[PID]=W.[ORDERPLANID] "); + sql.AppendFormat(" LEFT JOIN [T_MD_MATERIAL] AS M WITH(NOLOCK) "); + sql.AppendFormat(" ON W.[MATERIAL_CODE]=M.[MATERIAL_CODE] "); + sql.AppendFormat(" WHERE P.[PLAN_NO]=@planno "); + sql.AppendFormat(" ORDER BY W.[UPDATEDATE],W.[PRI],W.[PLAN_DATE],P.PLAN_SEQ,W.[SEQ],W.[MATERIAL_CODE] "); + List parameters = new List(); + parameters.Add(new DataParameter("planno", planno)); + using (var session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql.ToString(), parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取指定工序的生产计划清单 + /// + /// 工序编码 + /// 数量 + /// 过滤选项:0全部;1隐藏挂起;2只看挂起 + /// + public List GetOrderInCell(string workcellcode,int filter=0, int count = 20) + { + try + { + StringBuilder sql = new StringBuilder(); + sql.AppendFormat("SELECT TOP {0} W.[PID]\r\n", count); + sql.AppendFormat(" ,W.[ORDERPLANID] "); + sql.AppendFormat(" ,W.[ORDERPLAN_NO] "); + sql.AppendFormat(" ,W.[ORDER_TYPE] "); + sql.AppendFormat(" ,W.[SEQ] "); + sql.AppendFormat(" ,W.[MATERIAL_CODE] "); + sql.AppendFormat(" ,M.[MATERIAL_NAME] "); + sql.AppendFormat(" ,W.[PBOM_CODE] "); + sql.AppendFormat(" ,W.[QTY] "); + sql.AppendFormat(" ,W.[COMPLETE_QTY] "); + sql.AppendFormat(" ,W.[PLAN_DATE] "); + sql.AppendFormat(" ,W.[SHIFT_CODE] "); + sql.AppendFormat(" ,W.[WORKCENTER_CODE] "); + sql.AppendFormat(" ,W.[WORKCENTER_NAME] "); + sql.AppendFormat(" ,W.[WORKCELL_CODE] "); + sql.AppendFormat(" ,W.[WORKCELL_NAME] "); + sql.AppendFormat(" ,W.[WORKLOC_CODE] "); + sql.AppendFormat(" ,W.[REMARK] "); + sql.AppendFormat(" ,W.[EQPT_NAME] "); + sql.AppendFormat(" ,W.[EQPT_CODE] "); + sql.AppendFormat(" ,W.[STATE] "); + sql.AppendFormat(" ,W.[MOULD_CODE] "); + sql.AppendFormat(" ,W.[PRI] "); + sql.AppendFormat(" ,W.[UPDATEDATE] "); + sql.AppendFormat(" ,P.[IGNORE_FISBREAK] "); + sql.AppendFormat(" ,P.[FIS_ASMSETCODE] "); + sql.AppendFormat(" FROM [T_PP_WORKORDER] AS W WITH(NOLOCK) "); + sql.AppendFormat(" LEFT JOIN [T_PP_ORDERPLAN] AS P WITH(NOLOCK) "); + sql.AppendFormat(" ON P.[PID]=W.[ORDERPLANID] "); + sql.AppendFormat(" LEFT JOIN [T_MD_MATERIAL] AS M WITH(NOLOCK)"); + sql.AppendFormat(" ON W.[MATERIAL_CODE]=M.[MATERIAL_CODE] "); + sql.AppendFormat(" WHERE W.[WORKCELL_CODE]=@workcellcode "); + switch (filter) + { + case 1: + { + sql.AppendFormat(" AND W.[STATE]<>4 "); + break; + } + case 2: + { + sql.AppendFormat(" AND W.[STATE]=4 "); + break; + } + } + sql.AppendFormat(" ORDER BY W.[UPDATEDATE],W.[PRI],W.[PLAN_DATE],P.PLAN_SEQ,W.[SEQ],W.[MATERIAL_CODE] "); + List parameters = new List(); + parameters.Add(new DataParameter("workcellcode", workcellcode)); + using (var session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql.ToString(), parameters.ToArray()).ToList(); + } + } + catch(Exception ex) + { + throw ex; + } + } + + /// + /// 获取指定工序的生产计划清单 + /// + /// 工序编码 + /// 数量 + /// 过滤选项:0全部;1隐藏挂起;2只看挂起 + /// + public List GetOrderUnPrinted(string routecode, string Direction, int filter = 0, int count = 20) + { + try + { + StringBuilder sql = new StringBuilder(); + sql.AppendFormat("SELECT TOP {0} W.[PID]\r\n", count); + sql.AppendFormat(" ,W.[ORDERPLANID] "); + sql.AppendFormat(" ,W.[ORDERPLAN_NO] "); + sql.AppendFormat(" ,W.[ORDER_TYPE] "); + sql.AppendFormat(" ,W.[SEQ] "); + sql.AppendFormat(" ,W.[MATERIAL_CODE] "); + sql.AppendFormat(" ,M.[MATERIAL_NAME] "); + sql.AppendFormat(" ,W.[PBOM_CODE] "); + sql.AppendFormat(" ,W.[QTY] "); + sql.AppendFormat(" ,W.[COMPLETE_QTY] "); + sql.AppendFormat(" ,W.[PLAN_DATE] "); + sql.AppendFormat(" ,W.[SHIFT_CODE] "); + sql.AppendFormat(" ,W.[WORKCENTER_CODE] "); + sql.AppendFormat(" ,W.[WORKCENTER_NAME] "); + sql.AppendFormat(" ,W.[WORKCELL_CODE] "); + sql.AppendFormat(" ,W.[WORKCELL_NAME] "); + sql.AppendFormat(" ,W.[WORKLOC_CODE] "); + sql.AppendFormat(" ,W.[REMARK] "); + sql.AppendFormat(" ,W.[EQPT_NAME] "); + sql.AppendFormat(" ,W.[EQPT_CODE] "); + sql.AppendFormat(" ,W.[STATE] "); + sql.AppendFormat(" ,W.[MOULD_CODE] "); + sql.AppendFormat(" ,W.[PRI] "); + sql.AppendFormat(" ,W.[UPDATEDATE] "); + sql.AppendFormat(" ,W.[PRINTED] "); + sql.AppendFormat(" ,P.[IGNORE_FISBREAK] "); + sql.AppendFormat(" ,P.[FIS_ASMSETCODE] "); + sql.AppendFormat(" FROM [T_PP_WORKORDER] AS W WITH(NOLOCK) "); + sql.AppendFormat(" LEFT JOIN [T_PP_ORDERPLAN] AS P WITH(NOLOCK) "); + sql.AppendFormat(" ON P.[PID]=W.[ORDERPLANID] "); + sql.AppendFormat(" LEFT JOIN [T_MD_MATERIAL] AS M WITH(NOLOCK) "); + sql.AppendFormat(" ON W.[MATERIAL_CODE]=M.[MATERIAL_CODE] "); + sql.AppendFormat(" WHERE P.[ROUTE_CODE]=@routecode "); + sql.AppendFormat(" AND W.[PRINTED]='0' "); + + if (!string.IsNullOrEmpty(Direction)) + { + sql.AppendFormat($" AND M.[MATERIAL_NAME] LIKE '%{Direction}%' "); + } + + switch (filter) + { + case 1: + { + sql.AppendFormat(" AND W.[STATE]<>4 "); + break; + } + case 2: + { + sql.AppendFormat(" AND W.[STATE]=4 "); + break; + } + } + sql.AppendFormat(" ORDER BY W.[UPDATEDATE],W.[PRI],W.[PLAN_DATE],P.PLAN_SEQ,W.[SEQ],W.[MATERIAL_CODE] "); + List parameters = new List(); + parameters.Add(new DataParameter("routecode", routecode)); + using (var session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql.ToString(), parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取指定工序的待完成计划数量 + /// + /// 工序编码 + /// 不指定班次则查询全部计划 + /// 不指定班次则无需输入日期 + /// + public int GetOrderCountInCell(string workcellcode,string shift,DateTime date) + { + try + { + List parameters = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendFormat("SELECT COUNT(*) "); + sql.AppendFormat(" FROM [T_PP_WORKORDER] WITH(NOLOCK) "); + sql.AppendFormat(" WHERE [WORKCELL_CODE]=@workcellcode "); + sql.AppendFormat(" AND [STATE]<>4"); + if (!string.IsNullOrWhiteSpace(shift)) + { + sql.AppendFormat(" AND [SHIFT_CODE]=@shift"); + parameters.Add(new DataParameter("shift", shift)); + //sql.AppendFormat(" AND DATEDIFF(DAY,[PLAN_DATE],@date)=0"); + //parameters.Add(new DataParameter("date", date)); + sql.AppendFormat(" AND [PLAN_DATE] BETWEEN @date1 AND @date2"); + parameters.Add(new DataParameter("date1", date.Date)); + parameters.Add(new DataParameter("date2", date.Date.AddDays(1))); + } + parameters.Add(new DataParameter("workcellcode", workcellcode)); + + + using (var session = AppDataFactory.CreateMainSession()) + { + return (int)session.ExecuteSqlScalar(sql.ToString(), parameters.ToArray()); + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取查询语句 + /// + /// 获取查询语句 + /// + /// 查询条件 + /// 参数 + /// 查询语句 + private string GetQuerySql(WorkOrder condition, ref List parameters) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + try + { + //构成查询语句 + sqlBuilder.Append("SELECT PID,ORDERPLANID,ORDERPLAN_NO,ORDER_TYPE,SEQ,MATERIAL_CODE,PBOM_CODE,QTY,COMPLETE_QTY,PLAN_DATE,SHIFT_CODE,WORKCENTER_CODE,WORKCENTER_NAME,WORKCELL_CODE,WORKCELL_NAME,WORKLOC_CODE,REMARK,EQPT_NAME,EQPT_CODE,STATE "); + sqlBuilder.Append("FROM T_PP_WORKORDER WITH(NOLOCK) "); + whereBuilder.Append(" AND FLGDEL<> '1' "); + //查询条件 + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + return sqlBuilder.ToString(); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 获取导出的数据 + /// + /// 获取导出的数据 + /// + /// 查询条件 + /// 数据 + public DataTable GetExportData(WorkOrder info) + { + DataTable dt = null; + string sql = null; + List parameters = new List(); + try + { + //构成查询语句 + sql = this.GetQuerySql(info, ref parameters); + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + dt = session.GetTable(sql, parameters.ToArray()); + dt.TableName = "WorkOrder"; + } + return dt; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 信息是否重复 + /// + /// 判断名称是否存在 + /// + /// + /// true:已存在;fasel:不存在。 + public bool Exists(WorkOrder info) + { + StringBuilder sqlBuilder = new StringBuilder(); + StringBuilder whereBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + sqlBuilder.Append("SELECT COUNT(0) FROM T_PP_WORKORDER WITH(NOLOCK) "); + if (info.PID == null) + { + info.PID = ""; + } + whereBuilder.Append(" AND PID <> @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + + //添加进行无重复字段判断代码 + + if (whereBuilder.Length > 0) + { + sqlBuilder.Append(" WHERE " + whereBuilder.ToString().Substring(4)); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + count = Convert.ToInt32(session.ExecuteSqlScalar(sqlBuilder.ToString(), parameters.ToArray())); + } + return count > 0; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 插入信息 + /// + /// 插入信息(单表) + /// + /// 信息 + /// 插入行数 + public int Insert(WorkOrder info) + { + try + { + if (BaseSession != null) + { + return BaseSession.Insert(info); + } + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //插入基本信息 + return session.Insert(info); + } + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 更新信息 + /// + /// 更新信息 + /// + /// + /// 更新行数 + public int Update(WorkOrder info) + { + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //更新基本信息 + count = session.Update(info); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 逻辑删除 + /// + /// 逻辑删除信息 + /// + /// + /// 删除个数 + public int Delete(WorkOrder info) + { + StringBuilder sqlBuilder = new StringBuilder(); + List parameters = new List(); + int count = 0; + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //删除基本信息 + sqlBuilder.Append("UPDATE T_PP_WORKORDER "); + sqlBuilder.Append("SET FLGDEL = '1' "); + sqlBuilder.Append("WHERE PID = @PID "); + parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = info.PID }); + count = session.ExecuteSql(sqlBuilder.ToString(), parameters.ToArray()); + } + return count; + } + catch (Exception ex) + { + throw ex; + } + } + + #endregion + + /// + /// 删除派工单 + /// + /// + public void BatchDeleteByOrderPlan(WorkOrder entity) + { + try + { + string deleteSql = string.Format("delete from T_PP_WORKORDER where ORDERPLANID='{0}' ", entity.ORDERPLANID); + this.BaseSession.ExecuteSql(deleteSql, new List().ToArray()); + } + catch (Exception ex) + { + + throw ex; + } + + } + + #region 导入 + public ImportMessage GetImportData(List list) + { + ImportMessage em = new ImportMessage(); + List parameters = new List(); + try + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //设置祖先对象数据会话 + session.OpenTs(); + foreach (WorkOrder info in list) + { + if (info.IsNewInfo) + { + //插入信息 + int count = session.Insert(info); + em.insertNum++; + } + else + { + //更新信息 + int count = session.Update(info); + em.updateNum++; + } + } + session.CommitTs(); + } + } + catch (Exception ex) + { + throw ex; + } + return em; + } + #endregion + + /// + /// 获取指定工位正在执行的派工单 + /// + /// + /// + public WorkOrder GetWorkingOrderInLoc(string workloccode,string mouldcode) + { + try + { + List parameters = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT O.* "); + sql.AppendLine(" ,P.[IGNORE_FISBREAK] "); + sql.AppendLine(" ,P.[FIS_ASMSETCODE] "); + sql.AppendLine(" FROM [T_PP_WORKORDER] AS O WITH(NOLOCK) "); + sql.AppendLine(" LEFT JOIN [T_PP_ORDERPLAN] AS P WITH(NOLOCK) "); + sql.AppendLine(" ON P.[PID]=O.[ORDERPLANID] "); + sql.AppendLine(" WHERE O.[WORKLOC_CODE]=@workloccode "); + sql.AppendLine(" AND O.[MOULD_CODE]=@mouldcode "); + sql.AppendLine(" AND O.[STATE]='2' "); //工单状态为执行中 + parameters.Add(new DataParameter("workloccode", workloccode)); + parameters.Add(new DataParameter("mouldcode", mouldcode)); + using (var session = AppDataFactory.CreateMainSession()) + { + return session.Get(sql.ToString(), parameters.ToArray()); + } + } + catch (Exception ex) + { + throw ex; + } + } + + /// + /// 获取第一条匹配的派工单 + /// + /// 工序 + /// 产品物料号 + /// + public WorkOrder GetFirstMatchOrder(string workcellcode, string productmaterial,string planpid="") + { + List parameters = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT TOP 1 O.* "); + sql.AppendLine(" ,P.[IGNORE_FISBREAK] "); + sql.AppendLine(" ,P.[FIS_ASMSETCODE] "); + sql.AppendLine(" FROM [T_PP_WORKORDER] AS O WITH(NOLOCK) "); + sql.AppendLine(" LEFT JOIN [T_PP_ORDERPLAN] AS P WITH(NOLOCK) "); + sql.AppendLine(" ON P.[PID]=O.[ORDERPLANID] "); + sql.AppendLine(" WHERE O.[WORKCELL_CODE]=@workcellcode "); + if (!string.IsNullOrWhiteSpace(planpid)) + { + sql.AppendLine(" AND O.[ORDERPLANID]=@planpid"); + parameters.Add(new DataParameter("planpid", planpid)); + } + sql.AppendLine(" AND (EXISTS (SELECT 1 "); + sql.AppendLine(" FROM T_MD_PBOM_ITEM AS I "); + sql.AppendLine(" WHERE O.PBOM_CODE = I.PBOM_CODE "); + sql.AppendLine(" AND I.FLGDEL = '0' "); + sql.AppendLine(" AND I.MATERIAL_CODE = @materialcode) "); + sql.AppendLine(" OR O.[MATERIAL_CODE]=@materialcode) "); + sql.AppendLine(" AND (O.[STATE]='0' OR O.[STATE]='1') "); + sql.AppendLine(" ORDER BY O.UPDATEDATE,O.PRI,O.PLAN_DATE,P.PLAN_SEQ,SEQ "); //排序为 FIS优先、日期正序、顺序号正序 + parameters.Add(new DataParameter("workcellcode", workcellcode)); + parameters.Add(new DataParameter("materialcode", productmaterial)); + using (var session = AppDataFactory.CreateMainSession()) + { + return session.Get(sql.ToString(), parameters.ToArray()); + } + } + + /// + /// 获取工序下匹配的派工单 + /// + /// 工序 + /// + public List GetMatchOrders(string workcellcode,string planpid="") + { + List parameters = new List(); + StringBuilder sql = new StringBuilder(); + + sql.AppendLine("SELECT W.* "); + sql.AppendLine(" ,P.[IGNORE_FISBREAK] "); + sql.AppendLine(" ,P.[FIS_ASMSETCODE] "); + sql.AppendLine(" FROM [T_PP_WORKORDER] AS W WITH(NOLOCK) "); + sql.AppendLine(" LEFT JOIN [T_PP_ORDERPLAN] AS P WITH(NOLOCK) "); + sql.AppendLine(" ON P.[PID]=W.[ORDERPLANID] "); + sql.AppendLine(" WHERE W.SEQ = (SELECT TOP 1 SEQ "); + sql.AppendLine(" FROM [T_PP_WORKORDER] AS O WITH(NOLOCK) "); + sql.AppendLine(" LEFT JOIN [T_PP_ORDERPLAN] AS P1 WITH(NOLOCK) "); + sql.AppendLine(" ON P1.[PID]=O.[ORDERPLANID] "); + sql.AppendLine(" WHERE O.[WORKCELL_CODE]=@workcellcode "); + sql.AppendLine(" AND (O.[STATE]='0' OR O.[STATE]='1') "); + if (!string.IsNullOrWhiteSpace(planpid)) + { + sql.AppendLine(" AND O.[ORDERPLANID]=@planpid"); + } + sql.AppendLine(" ORDER BY O.UPDATEDATE,O.PRI,O.PLAN_DATE,P1.PLAN_SEQ,SEQ) ");//排序为 FIS优先、日期正序、计划顺序号、工单顺序号正序 + sql.AppendLine(" AND W.[WORKCELL_CODE]=@workcellcode "); + sql.AppendLine(" AND (W.[STATE]='0' OR W.[STATE]='1') "); + if (!string.IsNullOrWhiteSpace(planpid)) + { + sql.AppendLine(" AND W.[ORDERPLANID]=@planpid"); + parameters.Add(new DataParameter("planpid", planpid)); + } + + parameters.Add(new DataParameter("workcellcode", workcellcode)); + using (var session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql.ToString(), parameters.ToArray()).ToList(); + } + } + + + #region 改变派工单 + /// + /// 改变派工单 + /// + /// + public void ChangeByOrderPlan(WorkOrder entity) + { + if (this.BaseSession != null) + { + + this.BaseSession.Update(entity); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + + session.Update(entity); + } + } + + } + #endregion + /// + /// 获取派工单 + /// + /// + /// + public WorkOrder GetworkOrderInfo(WorkOrder model) + { + string sql = null; + List parameters = new List(); + try + { + sql = "SELECT TOP 1 * FROM T_PP_WORKORDER WITH(NOLOCK) WHERE STATE=0 "; + + if (string.IsNullOrEmpty(model.ORDERPLANID) == false) + { + sql += " AND ORDERPLANID = @ORDERPLANID"; + parameters.Add(new DataParameter("ORDERPLANID", model.ORDERPLANID)); + } + if (BaseSession != null) + { + //获取信息 + model = BaseSession.Get(sql, parameters.ToArray()); + } + else + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + model = session.Get(sql, parameters.ToArray()); + } + } + return model; + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "信息数据层-获取信息" + }); + throw; + } + } + + /// + /// 获取指定日期前的FIS计划顺序号 + /// + /// + /// + /// + public string GetLastFISSEQ(DateTime plandate, string workcentercode) + { + StringBuilder sql = new StringBuilder() ; + List parameters = new List(); + try + { + sql.AppendLine("SELECT TOP 1 [PLAN_SEQ] "); + sql.AppendLine(" FROM [T_PP_ORDERPLAN] WITH(NOLOCK) "); + sql.AppendLine(" WHERE [PLANSOURCE]='0' "); + sql.AppendLine(" AND [PLAN_DATE]<@plandate "); + sql.AppendLine(" AND [WORKCENTER_CODE]=@workcentercode "); + sql.AppendLine(" ORDER BY [PLAN_DATE] DESC "); + + parameters.Add(new DataParameter("plandate", plandate)); + parameters.Add(new DataParameter("workcentercode", workcentercode)); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + var ret= session.ExecuteSqlScalar(sql.ToString(), parameters.ToArray()); + if (ret != null) + { + return ret.ToString(); + } + else + { + return ""; + } + } + + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "信息数据层-获取信息" + }); + throw; + } + } + /// + /// 根据模架搜索工单 + /// + /// + /// + public WorkOrder SearchByMould(string mouldcode, string workcellcode) + { + + try + { + StringBuilder sql = new StringBuilder(); + List parameters = new List(); + + sql.AppendLine("SELECT TOP 1 W.* "); + sql.AppendLine(" FROM T_PP_WORKORDER AS W WITH(NOLOCK) "); + sql.AppendLine(" LEFT JOIN [T_PP_ORDERPLAN] AS P WITH(NOLOCK) "); + sql.AppendLine(" ON P.[PID]=W.[ORDERPLANID] "); + sql.AppendLine(" LEFT JOIN T_MD_MATERIAL AS M WITH(NOLOCK) "); + sql.AppendLine(" ON M.MATERIAL_CODE=W.MATERIAL_CODE "); + sql.AppendLine(" LEFT JOIN T_QT_MATERIAL_BINDING AS MB WITH(NOLOCK) "); + sql.AppendLine(" ON MB.MATERIAL_CODE=M.MATERIAL_TYPE_CODE "); + sql.AppendLine(" AND MB.BINDING_TYPE='ASSY' "); + sql.AppendLine(" WHERE MB.TARGET_CODE=@mouldcode "); + sql.AppendLine(" AND W.WORKCELL_CODE=@workcellcode "); + sql.AppendLine(" AND (W.STATE='1' OR W.STATE='0') "); + sql.AppendLine(" ORDER BY W.UPDATEDATE,W.PRI,w.PLAN_DATE,P.PLAN_SEQ,W.SEQ "); + + parameters.Add(new DataParameter("mouldcode", mouldcode)); + parameters.Add(new DataParameter("workcellcode", workcellcode)); + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + return session.Get(sql.ToString(), parameters.ToArray()); + } + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "信息数据层-获取信息" + }); + throw; + } + } + + + + public List GetListByID(string[] orderid) + { + try + { + StringBuilder sql = new StringBuilder(); + List parameters = new List(); + + string ids = string.Join("','", orderid); + + sql.AppendFormat("SELECT * FROM T_PP_WORKORDER WITH(NOLOCK) WHERE PID IN ('{0}')", ids); + + + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + return session.GetList(sql.ToString(), parameters.ToArray()).ToList(); + } + } + catch (Exception ex) + { + LogManager.LogHelper.Error(new LogInfo() + { + ErrorInfo = ex, + Tag = ex.StackTrace, + Info = "信息数据层-获取信息GetListByID" + }); + throw; + } + } + /// + /// 批量更新 + /// + /// + /// + public int Update(List orders) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + return session.Update(orders); + } + } + /// + /// 批量删除 + /// + /// + /// + public int Delete(List orders) + { + using (IDataSession session = AppDataFactory.CreateMainSession()) + { + //获取信息 + return session.Delete(orders); + } + } + + public WorkOrder GetWorkingOrderWithProduct(string workcellcode, string productcode, string planpid = "") + { + List parameters = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT TOP 1 O.* "); + sql.AppendLine(" ,P.[IGNORE_FISBREAK] "); + sql.AppendLine(" ,P.[FIS_ASMSETCODE] "); + sql.AppendLine(" FROM [T_PP_WORKORDER] AS O WITH(NOLOCK) "); + sql.AppendLine(" LEFT JOIN [T_PP_ORDERPLAN] AS P WITH(NOLOCK) "); + sql.AppendLine(" ON P.[PID]=O.[ORDERPLANID] "); + sql.AppendLine(" WHERE O.[WORKCELL_CODE]=@workcellcode "); + if (!string.IsNullOrWhiteSpace(planpid)) + { + sql.AppendLine(" AND O.[ORDERPLANID]=@planpid"); + parameters.Add(new DataParameter("planpid", planpid)); + } + sql.AppendLine(" AND O.[REMARK]=@productcode"); + sql.AppendLine(" AND (O.[STATE]='0' OR O.[STATE]='1') "); + sql.AppendLine(" ORDER BY O.UPDATEDATE,O.PRI,O.PLAN_DATE,P.PLAN_SEQ,SEQ "); //排序为 FIS优先、日期正序、顺序号正序 + parameters.Add(new DataParameter("workcellcode", workcellcode)); + parameters.Add(new DataParameter("productcode", productcode)); + using (var session = AppDataFactory.CreateMainSession()) + { + return session.Get(sql.ToString(), parameters.ToArray()); + } + } + + public int GetDayPlanCount(string workcentercode, DateTime date) + { + try + { + List parameters = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT ISNULL(SUM(QTY),0) "); + sql.AppendLine(" FROM T_PP_ORDERPLAN WITH(NOLOCK) "); + sql.AppendLine(" WHERE WORKCENTER_CODE=@workcentercode "); + //sql.AppendLine(" AND DATEDIFF(DAY,PLAN_DATE,@date)=0 "); + sql.AppendFormat(" AND [PLAN_DATE] BETWEEN @date1 AND @date2"); + parameters.Add(new DataParameter("date1", date.Date)); + parameters.Add(new DataParameter("date2", date.Date.AddDays(1))); + + parameters.Add(new DataParameter("workcentercode", workcentercode)); + //parameters.Add(new DataParameter("date", date)); + + using (var session = AppDataFactory.CreateMainSession()) + { + return (int)session.ExecuteSqlScalar(sql.ToString(), parameters.ToArray()); + } + } + catch (Exception ex) + { + throw ex; + } + } + + public int SetOrderPrinted(string orderpid) + { + List parameters = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("UPDATE T_PP_WORKORDER SET PRINTED='1' WHERE PID=@orderpid"); + parameters.Add(new DataParameter("orderpid", orderpid)); + + using (var session = AppDataFactory.CreateMainSession()) + { + return session.ExecuteSql(sql.ToString(), parameters.ToArray()); + } + } + + public List GetLastFISPlan(string workcellcode, string routecode) + { + List parameters = new List(); + StringBuilder sql = new StringBuilder(); + sql.AppendLine("SELECT TOP 2 P.* "); + sql.AppendLine(" FROM T_PP_ORDERPLAN AS P WITH(NOLOCK) "); + sql.AppendLine(" LEFT JOIN T_PP_WORKORDER AS W WITH(NOLOCK) "); + sql.AppendLine(" ON W.ORDERPLAN_NO=P.PLAN_NO "); + sql.AppendLine(" WHERE P.PLANSOURCE='0' "); + sql.AppendLine(" AND P.ROUTE_CODE=@routecode "); + sql.AppendLine(" AND ((W.WORKCELL_CODE=@workcellcode "); + sql.AppendLine(" AND W.STATE='4') "); + sql.AppendLine(" OR W.WORKCELL_CODE<>@workcellcode) "); + sql.AppendLine(" ORDER BY P.PLAN_DATE DESC,P.PLAN_SEQ DESC,P.PLAN_NO DESC"); + parameters.Add(new DataParameter("workcellcode", workcellcode)); + parameters.Add(new DataParameter("routecode", routecode)); + + using (var session = AppDataFactory.CreateMainSession()) + { + return session.GetList(sql.ToString(), parameters.ToArray()).ToList(); + } + } + } +} diff --git a/APPQ5/QMAPP.FJC.Entity/TianJin/TJWorkOrder.cs b/APPQ5/QMAPP.FJC.Entity/TianJin/TJWorkOrder.cs index 6d6ec89..7755ae5 100644 --- a/APPQ5/QMAPP.FJC.Entity/TianJin/TJWorkOrder.cs +++ b/APPQ5/QMAPP.FJC.Entity/TianJin/TJWorkOrder.cs @@ -93,6 +93,10 @@ namespace QMAPP.FJC.Entity.TianJin [DBColumn(ColumnName = "UPDATEDATE", DataType = DbType.DateTime)] public DateTime UPDATEDATE { get; set; } + public int PRI { get; set; } + public string PBOM_CODE { get; set; } + public string WORKCELL_CODE { get; set; } + public string ORDER_TYPE { get; set; } } } diff --git a/APPQ5/QMAPP.WinForm/App.config b/APPQ5/QMAPP.WinForm/App.config index 585b5c1..f59e43a 100644 --- a/APPQ5/QMAPP.WinForm/App.config +++ b/APPQ5/QMAPP.WinForm/App.config @@ -8,10 +8,10 @@ - + + - + @@ -184,13 +184,13 @@ - + - + diff --git a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs index e71886a..ed4213f 100644 --- a/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs +++ b/APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs @@ -125,7 +125,7 @@ namespace QMAPP.WinForm.Forms.Operation if (str__cfgAutoInputLocs.Split(';').Length > 0) _cfgAutoInputLocs = str__cfgAutoInputLocs.Split(';'); _cfgAutoInputSwitch = GetAppConfigValue("AutoInputSwitch"); //查找所有 需要自动填充的工位 - _bentiBarCodeRegex = GetAppConfigValue("AutoInput条码正则表达式"); + _bentiBarCodeRegex = GetAppConfigValue("AutoInput"); _052printWorkloc = System.Configuration.ConfigurationManager.AppSettings["052打印工位"]; _371BiaoPiBarCodeRegex = System.Configuration.ConfigurationManager.AppSettings["052打印条码规则371"]; @@ -907,10 +907,10 @@ namespace QMAPP.WinForm.Forms.Operation if (!string.IsNullOrEmpty(result.MATERIAL_CODE)) { var bomCodes = GetPBOMCODEValue(result.MATERIAL_CODE); - List filterList = list.Where(p => bomCodes.Contains(p.PBOM_CODE)).ToList(); - if (filterList.Count > 0) + //List filterList = list.Where(p => bomCodes.Contains(p.PBOM_CODE)).ToList(); + if (bomCodes.Count > 0) { - string PBOM_CODE = filterList[0].PBOM_CODE; + string PBOM_CODE = bomCodes[0]; //List autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE); diff --git a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmItemList.cs b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmItemList.cs index ad4c2c3..76ac5fe 100644 --- a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmItemList.cs +++ b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmItemList.cs @@ -10,6 +10,7 @@ using CarSystem.Account.FileUtil; using System.Configuration; using DCS.Place; using Model; +using QMAPP.ServicesAgent; namespace QMAPP.WinForm.Forms.TianJin { @@ -18,12 +19,17 @@ namespace QMAPP.WinForm.Forms.TianJin /// public partial class TJFrmItemList : Form { + + private string _TJFYPrintName = string.Empty; //打印机名称 + /// /// /// public TJFrmItemList() { InitializeComponent(); + + _TJFYPrintName = GetAppConfigValue("FYPrintName"); //查找所有 需要自动填充的工位 } @@ -364,16 +370,35 @@ namespace QMAPP.WinForm.Forms.TianJin dt.Rows.Add(ncsdr); index++; } - prin.Print(dt); - //MessageBox.Show("打印成功!"); + //prin.Print(dt); + if (!string.IsNullOrEmpty(_TJFYPrintName)) + { + System.Drawing.Printing.PrintDocument doc = new System.Drawing.Printing.PrintDocument(); + doc.PrinterSettings.PrinterName = _TJFYPrintName; + prin.Print(dt, _TJFYPrintName); + } + else + { + prin.Print(dt); + } } + /// + /// 查找配置表 + /// + /// + public string GetAppConfigValue(string pConfigCode) + { + QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent(); + var AppConfig = agent.InvokeServiceFunction(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode); - - - - + if (AppConfig != null) + return AppConfig.Value; + else + return null; + } + } } diff --git a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt index a0bab9dacff69f6e65306f4254869d05623bd5ba..01f395cd0487feb2a300b2b866533833d646a3fb 100644 GIT binary patch delta 10184 zcmbt)WmFyAvMsi8cMtCF4#C|$xVt-q#)A9C-QC^YorK^)f+WG+<>ou@y!*x*_x!un zqq=L&u2Eh6tHzpZ1_eO{1wkdUkr6@s+t48(KKu8k1Nc~FpQ+Dk+bb*KlqhA?HX`2akw{Ph2#F8llA7ji4!$KNJ z^U3=Z_t=HMvLar2S>rbn_TX#;CYb45Ehtz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?t$RquFyorcQ~L!U@vveuW~mAdliKXe=zSc zOEttM)S(p&^X7NRrA3_YfLsr58gB=E8c>lea*Cq|>$Bxd*l|Q(=KlK<;%=)ZMZYA` z6nBI9Oop$hVPS8cs-PbOfX*Sc8f{-8<{gE1|MH6q17@*B3?tqGt#ef~@v=~+e>o@j zL*L!19&AhII@cV`L2`6WSo!Wadd?%+Oxxt3J%{YqjYab@akpi7Ge!<`Pk-ueJTQoD z$kWe|WYSKZAIqwBSIf%vI5Q9=AZVR(H+zZ(VqRENqg)Zwe=Ok}n-NJ;JZY@OePVqp=|K5nQZj;U8K|suM0g%N~^~ODBc*`KwFCX4e>1Sb?I&ENF8gCcztyv|| zAq(I`fw8mWvHq~U#b+psTB$>pw6?&gIT_L!>C&#Ma#yF~W1Kanq8p~yHZ=;?Zb!N1 zGf~cgXi#892>y9%m#AA2En3_<^Xogj^1Ti3bf56fM$QGhwjNTB58m2E6rf_R%QFZ5 z7?Az}?V6;0L7NzG?fK&EFO8Y#d(3+fr5w{#6;EuSn+dC5!WCw|W;VNZQP00PIg*Ga zAG`L(2HpFiZYgoon}Q}zb&?|jYNlU`&G;CdrN~MiDotVQ1xXvw8!(~Fuf&Ov+cY-Q zUXwqj{;MeeCnWijRwVLsB9i>Y|1{YV{e32hf*8@>{(^rx=?MQ4|8~^(); + listDir.Add(new Direction { Code = "左", Name = "左侧" }); + listDir.Add(new Direction { Code = "右", Name = "右侧" }); + comboBox1.DisplayMember = "Name"; + comboBox1.ValueMember = "Code"; + comboBox1.DataSource = listDir; } #region 加载列表显示设置 @@ -69,6 +76,7 @@ namespace QMAPP.WinForm.Forms.TianJin cbListRowcount.SelectedIndexChanged += new EventHandler(cbListRowcount_SelectedIndexChanged); cbRefreshRate.SelectedIndexChanged += new EventHandler(cbRefreshRate_SelectedIndexChanged); cbPlanFilter.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); + comboBox1.TextChanged += new EventHandler(cbPlanFilter_SelectedIndexChanged); #endregion } @@ -96,7 +104,7 @@ namespace QMAPP.WinForm.Forms.TianJin dataPage.PageIndex = 1; dataPage.SortExpression = " ROWVALUE ASC"; #region 服务查询 - var orderlist = _agent.InvokeServiceFunction>("WorkOrderBLL_GetOrderUnPrinted", cbRoutes.SelectedValue.ToString(), cbPlanFilter.SelectedIndex, dataPage); + var orderlist = _agent.InvokeServiceFunction>("TJWorkOrderBLL_GetOrderUnPrinted", cbRoutes.SelectedValue.ToString(), cbPlanFilter.SelectedIndex, dataPage, comboBox1.SelectedValue.ToString()); #endregion this.dgvPlan.DataSource = orderlist; } @@ -488,6 +496,16 @@ namespace QMAPP.WinForm.Forms.TianJin else return null; } + + private void comboBox1_SelectedIndexChanged(object sender, EventArgs e) + { + SaveSetting(); + BindPlanView(); + } + } + class Direction { + public string Code { get; set; } + public string Name { get; set; } } class LabelData { diff --git a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.resx b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.resx index f09aad3..e069562 100644 --- a/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.resx +++ b/APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.resx @@ -153,9 +153,6 @@ 17, 17 - - 17, 17 - diff --git a/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs b/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs index 19eb21a..d27e626 100644 --- a/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs +++ b/APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值, // 方法是按如下所示使用“*”: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("2022.03.28.02")] -[assembly: AssemblyFileVersion("2022.03.28.02")] +[assembly: AssemblyVersion("2022.03.29.01")] +[assembly: AssemblyFileVersion("2022.03.29.01")] diff --git a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml index 733bfd5..ae81a8e 100644 --- a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml +++ b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml @@ -974,4 +974,11 @@ QMAPP.FJC.BLL.DLL + + TJWorkOrderBLL + 派工单 + QMAPP.FJC.BLL.TianJin.TJWorkOrderBLL + QMAPP.FJC.BLL.dll + + \ No newline at end of file diff --git a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config index d651a04..ac985c4 100644 --- a/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config +++ b/ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config @@ -64,9 +64,9 @@ - + - +