dequan.zhang 3 years ago
parent
commit
29ae876086
  1. 1
      APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj
  2. 667
      APPQ5/QMAPP.FJC.BLL/TianJin/TJWorkOrderBLL.cs
  3. 1
      APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj
  4. 6
      APPQ5/QMAPP.FJC.DAL/TianJin/TJWorkOrderDAL.cs
  5. 1116
      APPQ5/QMAPP.FJC.DAL/TianJin/TWorkOrderDAL.cs
  6. 4
      APPQ5/QMAPP.FJC.Entity/TianJin/TJWorkOrder.cs
  7. 6
      APPQ5/QMAPP.WinForm/App.config
  8. 8
      APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs
  9. 37
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJFrmItemList.cs
  10. BIN
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt
  11. 89
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.Designer.cs
  12. 20
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs
  13. 3
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.resx
  14. 4
      APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs
  15. 7
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml

1
APPQ5/QMAPP.FJC.BLL/QMAPP.FJC.BLL.csproj

@ -190,6 +190,7 @@
<Compile Include="TianJin\TJDoorPlankPlanBLL.cs" />
<Compile Include="TianJin\TJFrmPlaceBLL.cs" />
<Compile Include="TianJin\TJOrderPlanBLL.cs" />
<Compile Include="TianJin\TJWorkOrderBLL.cs" />
<Compile Include="WarehouseManage\OutWarehouseBLL.cs" />
<Compile Include="ProduceManage\MendRecorderBLL.cs" />
<Compile Include="WarehouseManage\InWarehouseBLL.cs" />

667
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
{
/// <summary>
/// 模块名称:派工单
/// 作 者:张鹏
/// 编写日期:2017年10月24日
/// </summary>
public class TJWorkOrderBLL : BaseBLL
{
#region 获取信息
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>信息</returns>
public WorkOrder Get(WorkOrder info)
{
try
{
return new TWorkOrderDAL().Get(info);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 获取列表
/// <summary>
/// 获取列表
/// </summary>
/// <param name="condition">条件</param>
/// <param name="page">数据页</param>
/// <returns>数据页</returns>
public DataPage GetList(WorkOrder condition, DataPage page)
{
try
{
return new TWorkOrderDAL().GetList(condition, page);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 获取指定工序的生产计划清单
/// </summary>
/// <param name="workcellcode">工序编码</param>
/// <param name="filter">过滤选项:0全部;1隐藏挂起;2只看挂起</param>
/// <returns></returns>
public List<WorkOrder> GetOrderInCell(string workcellcode,int filter, DataPage dataPage)
{
try
{
return new TWorkOrderDAL().GetOrderInCell(workcellcode,filter,dataPage.PageSize);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
///
/// </summary>
/// <param name="orderplanno"></param>
/// <returns></returns>
public List<WorkOrder> GetOrderInfo(string orderplanno)
{
try
{
return new TWorkOrderDAL().GetWorkOrderInfo(orderplanno);
}
catch (Exception ex)
{
throw ex;
}
}
public List<WorkOrder> 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;
}
}
/// <summary>
/// 获取指定工序下待完成计划数量
/// </summary>
/// <param name="workcellcode">工序编码</param>
/// <param name="shift">班次</param>
/// <param name="date">日期</param>
/// <returns></returns>
public int GetOrderCountInCell(string workcellcode, string shift)
{
try
{
var date = DateTime.Now;
return new TWorkOrderDAL().GetOrderCountInCell(workcellcode, shift, date);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 获取工作中心当日的总计划数量
/// </summary>
/// <param name="workcentercode">工作中心</param>
/// <returns></returns>
public int GetDayPlanCount(string workcentercode)
{
try
{
var date = DateTime.Now;
return new TWorkOrderDAL().GetDayPlanCount(workcentercode, date);
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 获取计划标签数据
/// </summary>
/// <param name="workorderid"></param>
/// <returns></returns>
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;
}
/// <summary>
/// 获取计划标签数据
/// </summary>
/// <param name="workorderid"></param>
/// <returns></returns>
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 信息是否重复
/// <summary>
/// 判断名称是否存在
/// </summary>
/// <param name="">信息</param>
/// <returns>true:已存在;fasel:不存在。</returns>
public bool Exists(WorkOrder info)
{
try
{
return new TWorkOrderDAL().Exists(info);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 插入信息
/// <summary>
/// 插入信息(单表)
/// </summary>
/// <param name="">信息</param>
/// <returns>插入行数</returns>
public DataResult<int> Insert(WorkOrder info)
{
DataResult<int> result = new DataResult<int>();
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 更新信息
/// <summary>
/// 更新信息
/// </summary>
/// <param name="">信息</param>
/// <returns>更新行数</returns>
public DataResult<int> Update(WorkOrder info)
{
DataResult<int> result = new DataResult<int>();
try
{
result.Result = new TWorkOrderDAL().Update(info);
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 挂起工单
/// </summary>
/// <returns></returns>
public int SuspendOrder(List<string> 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);
}
/// <summary>
/// 取消挂起
/// </summary>
/// <param name="orderid"></param>
/// <returns></returns>
public int CancelSuspend(List<string> 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);
}
/// <summary>
/// 回收工单
/// </summary>
/// <param name="orderid"></param>
/// <returns></returns>
public int TakeBack(List<string> 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);
}
/// <summary>
/// 重置工单
/// </summary>
/// <param name="orderid"></param>
/// <returns></returns>
public int ResetOrder(List<string> 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;
}
/// <summary>
/// 忽略FIS断号
/// </summary>
/// <param name="orderid"></param>
/// <returns></returns>
public int IgnoreFISBreak(List<string> orderid)
{
var orders = GetListByID(orderid.ToArray());
var first = orders.FirstOrDefault();
var plans = new List<OrderPlan>();
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;
}
/// <summary>
/// 删除工单
/// </summary>
/// <param name="orderid"></param>
/// <returns></returns>
public int DeleteOrder(List<string> 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);
}
/// <summary>
/// 根据主键获取列表
/// </summary>
/// <param name="orderid"></param>
/// <returns></returns>
private List<WorkOrder> GetListByID(params string[] orderid)
{
var dal = new TWorkOrderDAL();
return dal.GetListByID(orderid);
}
#endregion
#region 删除
/// <summary>
/// 删除信息
/// </summary>
/// <param name="">主键串</param>
/// <returns>删除个数</returns>
public DataResult<int> DeleteArray(string strs)
{
int count = 0;
DataResult<int> result = new DataResult<int>();
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;
}
}
/// <summary>
/// 删除信息
/// </summary>
/// <param name="">信息</param>
/// <returns>删除个数</returns>
public int Delete(WorkOrder info)
{
try
{
return new TWorkOrderDAL().Delete(info);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 导出数据
/// <summary>
/// 获取导出的数据
/// </summary>
/// <param name="">查询条件</param>
/// <returns>数据</returns>
public DataTable GetExportData(WorkOrder info)
{
try
{
return new TWorkOrderDAL().GetExportData(info);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 导入数据
/// <summary>
/// 导入数据
/// </summary>
/// <param name="list">数据</param>
/// <returns>导入结果</returns>
public DataResult<ImportMessage> ImportData(List<WorkOrder> list)
{
DataResult<ImportMessage> result = new DataResult<ImportMessage>();
TWorkOrderDAL cmDal = new TWorkOrderDAL();
List<WorkOrder> List = new List<WorkOrder>();
int index = 0;
try
{
result.Result = new ImportMessage();
result.Result.Errors = new List<RowError>();
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
}
}

1
APPQ5/QMAPP.FJC.DAL/QMAPP.FJC.DAL.csproj

@ -180,6 +180,7 @@
<Compile Include="TianJin\TJFrmPlaceDAL.cs" />
<Compile Include="TianJin\TJOrderPlanDAL.cs" />
<Compile Include="TianJin\TJWorkOrderDAL.cs" />
<Compile Include="TianJin\TWorkOrderDAL.cs" />
<Compile Include="WarehouseManage\OutWarehouseDAL.cs" />
<Compile Include="WarehouseManage\InWarehouseDAL.cs" />
<Compile Include="WarnManage\EquipMentAlarmDAL.cs" />

6
APPQ5/QMAPP.FJC.DAL/TianJin/TJWorkOrderDAL.cs

@ -332,7 +332,7 @@ namespace QMAPP.FJC.DAL.TianJin
/// <param name="count">数量</param>
/// <param name="filter">过滤选项:0全部;1隐藏挂起;2只看挂起</param>
/// <returns></returns>
public List<TJWorkOrder> GetOrderUnPrinted(string routecode, int filter = 0, int count = 20)
public List<TJWorkOrder> 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:

1116
APPQ5/QMAPP.FJC.DAL/TianJin/TWorkOrderDAL.cs

File diff suppressed because it is too large

4
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; }
}
}

6
APPQ5/QMAPP.WinForm/App.config

@ -185,10 +185,10 @@
<client>
<!--<endpoint address="http://123.56.115.74:8989/GeneralService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeneralService" contract="CenterGeneralService.IGeneralService" name="BasicHttpBinding_IGeneralService" />
<endpoint address="http://123.56.115.74:8989/LoginService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeneralService" contract="LoginService.ILoginService" name="BasicHttpBinding_ILoginService" />-->
<endpoint address="net.tcp://10.111.144.98:4444/OpcService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IOpcService" contract="ServiceOpc.IOpcService" name="NetTcpBinding_IOpcService" />
<endpoint address="http://123.56.115.74:8989/LoginService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeneralService" contract="LoginService.ILoginService" name="BasicHttpBinding_ILoginService" />
<endpoint address="net.tcp://10.111.144.99:4444/OpcService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IOpcService" contract="ServiceOpc.IOpcService" name="NetTcpBinding_IOpcService" />-->
<!--<endpoint address="net.tcp://localhost:4444/OpcService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IOpcService" contract="ServiceOpc.IOpcService" name="NetTcpBinding_IOpcService" />-->
<endpoint address="net.tcp://localhost:4444/OpcService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IOpcService" contract="ServiceOpc.IOpcService" name="NetTcpBinding_IOpcService" />
<endpoint address="http://localhost:8938/GeneralService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeneralService" contract="CenterGeneralService.IGeneralService" name="BasicHttpBinding_IGeneralService" />
<endpoint address="http://localhost:8938/LoginService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeneralService" contract="LoginService.ILoginService" name="BasicHttpBinding_ILoginService" />

8
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<FJC.Entity.ProductionPlan.WorkOrder> filterList = list.Where(p => bomCodes.Contains(p.PBOM_CODE)).ToList();
if (filterList.Count > 0)
//List<FJC.Entity.ProductionPlan.WorkOrder> 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<string> autoInputBarCodes = LocSwitchHelper.GetAutoInputBarCode(bomCode, _operationServiceParam.machineInfo.WORKLOC_CODE);

37
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
/// </summary>
public partial class TJFrmItemList : Form
{
private string _TJFYPrintName = string.Empty; //打印机名称
/// <summary>
///
/// </summary>
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);
}
}
/// <summary>
/// 查找配置表
/// </summary>
/// <returns></returns>
public string GetAppConfigValue(string pConfigCode)
{
QMAPP.ServicesAgent.ServiceAgent agent = ClientContext.GetServiceAgent();
var AppConfig = agent.InvokeServiceFunction<QMAPP.FJC.Entity.Basic.AppConfig>(B9IPCService.AppConfigBLL_Get.ToString(), pConfigCode);
if (AppConfig != null)
return AppConfig.Value;
else
return null;
}
}
}

BIN
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPastCard.rpt

Binary file not shown.

89
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.Designer.cs

@ -29,16 +29,16 @@
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TJPrintPlanLabel));
this.dgvPlan = new System.Windows.Forms.DataGridView();
this.dgcOrderNo = new System.Windows.Forms.DataGridViewTextBoxColumn();
@ -87,14 +87,14 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.dgvPlan.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.AllCells;
this.dgvPlan.BackgroundColor = System.Drawing.SystemColors.ButtonFace;
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvPlan.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11;
dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvPlan.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
this.dgvPlan.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvPlan.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.dgcOrderNo,
@ -111,16 +111,16 @@
this.dgvPlan.Location = new System.Drawing.Point(6, 6);
this.dgvPlan.Name = "dgvPlan";
this.dgvPlan.ReadOnly = true;
dataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle19.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvPlan.RowHeadersDefaultCellStyle = dataGridViewCellStyle19;
dataGridViewCellStyle20.Padding = new System.Windows.Forms.Padding(0, 0, 8, 0);
this.dgvPlan.RowsDefaultCellStyle = dataGridViewCellStyle20;
dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
dataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
this.dgvPlan.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
dataGridViewCellStyle10.Padding = new System.Windows.Forms.Padding(0, 0, 8, 0);
this.dgvPlan.RowsDefaultCellStyle = dataGridViewCellStyle10;
this.dgvPlan.RowTemplate.Height = 23;
this.dgvPlan.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
this.dgvPlan.Size = new System.Drawing.Size(1350, 183);
@ -131,8 +131,8 @@
// dgcOrderNo
//
this.dgcOrderNo.DataPropertyName = "ORDERPLAN_NO";
dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgcOrderNo.DefaultCellStyle = dataGridViewCellStyle12;
dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgcOrderNo.DefaultCellStyle = dataGridViewCellStyle2;
this.dgcOrderNo.HeaderText = "订单号";
this.dgcOrderNo.Name = "dgcOrderNo";
this.dgcOrderNo.ReadOnly = true;
@ -141,8 +141,8 @@
// dgcSeq
//
this.dgcSeq.DataPropertyName = "SEQ";
dataGridViewCellStyle13.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcSeq.DefaultCellStyle = dataGridViewCellStyle13;
dataGridViewCellStyle3.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcSeq.DefaultCellStyle = dataGridViewCellStyle3;
this.dgcSeq.HeaderText = "顺序号";
this.dgcSeq.Name = "dgcSeq";
this.dgcSeq.ReadOnly = true;
@ -151,8 +151,8 @@
// dgcMaterialCode
//
this.dgcMaterialCode.DataPropertyName = "MATERIAL_CODE";
dataGridViewCellStyle14.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcMaterialCode.DefaultCellStyle = dataGridViewCellStyle14;
dataGridViewCellStyle4.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcMaterialCode.DefaultCellStyle = dataGridViewCellStyle4;
this.dgcMaterialCode.HeaderText = "零件号";
this.dgcMaterialCode.Name = "dgcMaterialCode";
this.dgcMaterialCode.ReadOnly = true;
@ -161,8 +161,8 @@
// dgcMaterialName
//
this.dgcMaterialName.DataPropertyName = "MATERIAL_NAME";
dataGridViewCellStyle15.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcMaterialName.DefaultCellStyle = dataGridViewCellStyle15;
dataGridViewCellStyle5.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcMaterialName.DefaultCellStyle = dataGridViewCellStyle5;
this.dgcMaterialName.HeaderText = "零件描述";
this.dgcMaterialName.Name = "dgcMaterialName";
this.dgcMaterialName.ReadOnly = true;
@ -170,8 +170,8 @@
//
// dgcState
//
dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgcState.DefaultCellStyle = dataGridViewCellStyle16;
dataGridViewCellStyle6.Font = new System.Drawing.Font("宋体", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgcState.DefaultCellStyle = dataGridViewCellStyle6;
this.dgcState.HeaderText = "工单状态";
this.dgcState.MinimumWidth = 80;
this.dgcState.Name = "dgcState";
@ -181,8 +181,8 @@
// dgcPlanDate
//
this.dgcPlanDate.DataPropertyName = "PLAN_DATE";
dataGridViewCellStyle17.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcPlanDate.DefaultCellStyle = dataGridViewCellStyle17;
dataGridViewCellStyle7.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcPlanDate.DefaultCellStyle = dataGridViewCellStyle7;
this.dgcPlanDate.HeaderText = "计划日期";
this.dgcPlanDate.Name = "dgcPlanDate";
this.dgcPlanDate.ReadOnly = true;
@ -191,8 +191,8 @@
// dgcShift
//
this.dgcShift.DataPropertyName = "SHIFT_CODE";
dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcShift.DefaultCellStyle = dataGridViewCellStyle18;
dataGridViewCellStyle8.Font = new System.Drawing.Font("宋体", 15.75F);
this.dgcShift.DefaultCellStyle = dataGridViewCellStyle8;
this.dgcShift.HeaderText = "计划类型";
this.dgcShift.Name = "dgcShift";
this.dgcShift.ReadOnly = true;
@ -453,14 +453,11 @@
this.comboBox1.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.comboBox1.Font = new System.Drawing.Font("微软雅黑", 14F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"显示全部工单",
"隐藏挂起工单",
"只看挂起工单"});
this.comboBox1.Location = new System.Drawing.Point(595, 64);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(175, 33);
this.comboBox1.TabIndex = 17;
this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged);
//
// label2
//

20
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs

@ -44,6 +44,13 @@ namespace QMAPP.WinForm.Forms.TianJin
cbRoutes.DisplayMember = "ROUTE_NAME";
cbRoutes.ValueMember = "ROUTE_CODE";
cbRoutes.DataSource = cbsource;
var listDir = new List<Direction>();
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<List<FJC.Entity.ProductionPlan.WorkOrder>>("WorkOrderBLL_GetOrderUnPrinted", cbRoutes.SelectedValue.ToString(), cbPlanFilter.SelectedIndex, dataPage);
var orderlist = _agent.InvokeServiceFunction<List<FJC.Entity.ProductionPlan.WorkOrder>>("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
{

3
APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.resx

@ -153,9 +153,6 @@
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tsbPrint.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

4
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")]

7
ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml

@ -974,4 +974,11 @@
<AssemblyFile>QMAPP.FJC.BLL.DLL</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>TJWorkOrderBLL</ServiceName>
<ServiceDes>派工单</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.TianJin.TJWorkOrderBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
</BusinessDllList>
Loading…
Cancel
Save