Browse Source

调整天津条码打印计划,显示顺序

master
songnan.zhang 2 years ago
parent
commit
7e3cefd593
  1. 3
      APP/QMAPP.Web/Web.config
  2. 52
      APPMD/QMAPP.MD.DAL/PbomDAL.cs
  3. 453
      APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs
  4. 6
      APPQ5/QMAPP.FJC.BLL/TianJin/StorageBLL.cs
  5. 2
      APPQ5/QMAPP.FJC.Web/Controllers/TJDoorPlankPlanPrintController.cs
  6. 12
      APPQ5/QMAPP.WinForm/App.config
  7. 2
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs
  8. 6
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

3
APP/QMAPP.Web/Web.config

@ -55,6 +55,9 @@
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/> <!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>--> <add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>-->
</connectionStrings> </connectionStrings>

52
APPMD/QMAPP.MD.DAL/PbomDAL.cs

@ -71,6 +71,58 @@ namespace QMAPP.MD.DAL
throw ex; throw ex;
} }
} }
/// <summary>
/// 获取信息
/// </summary>
/// <param name="">条件</param>
/// <returns>信息</returns>
public Pbom TJGet(Pbom model)
{
StringBuilder sqlBuilder = new StringBuilder();
List<DataParameter> parameters = new List<DataParameter>();
sqlBuilder.Append(" SELECT * ");
sqlBuilder.Append(" FROM T_MD_PBOM ");
sqlBuilder.Append(" WHERE FLGDEL = '0'");
if (string.IsNullOrEmpty(model.PBOM_CODE) == false)
{
sqlBuilder.Append(" AND PBOM_CODE = @PBOM_CODE ");
parameters.Add(new DataParameter { ParameterName = "PBOM_CODE", DataType = DbType.String, Value = model.PBOM_CODE });
}
if (string.IsNullOrEmpty(model.MATERIAL_CODE) == false)
{
sqlBuilder.Append(" AND MATERIAL_CODE LIKE @MATERIAL_CODE ");
parameters.Add(new DataParameter { ParameterName = "MATERIAL_CODE", DataType = DbType.String, Value = "%" + model.MATERIAL_CODE + "%" });
}
if (string.IsNullOrEmpty(model.PID) == false)
{
sqlBuilder.Append(" AND PID= @PID ");
parameters.Add(new DataParameter { ParameterName = "PID", DataType = DbType.String, Value = model.PID });
}
try
{
if (null != BaseSession)
{
string sqlChange = ChangeSqlByDB(sqlBuilder.ToString(), BaseSession);
model = BaseSession.Get<Pbom>(sqlChange, parameters.ToArray());
}
else
{
using (IDataSession session = AppDataFactory.CreateMainSession())
{
string sqlChange = ChangeSqlByDB(sqlBuilder.ToString(), session);
//获取信息
model = session.Get<Pbom>(sqlChange, parameters.ToArray());
}
}
return model;
}
catch (Exception ex)
{
RecordExceptionLog(ex, "Bom信息维护数据层-获取信息");
throw ex;
}
}
#endregion #endregion
#region 获取列表 #region 获取列表

453
APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs

@ -235,81 +235,88 @@ namespace QMAPP.FJC.BLL.FIS
{ {
DataResult<int> result = new DataResult<int>(); DataResult<int> result = new DataResult<int>();
//基本信息 //基本信息
try try
{ {
if (model.MATERIAL_CODE.Length <= 10) model.PID = Guid.NewGuid().ToString();
model.PLAN_STATE = "0";
model.PLANSOURCE = model.PLANSOURCE;
//var materialcode = "";
//if (model.MATERIAL_CODE.Substring(model.MATERIAL_CODE.Length - 1, 1) == "L" || model.MATERIAL_CODE.Substring(model.MATERIAL_CODE.Length - 1, 1) == "R")
// materialcode = model.MATERIAL_CODE.Substring(model.MATERIAL_CODE.Length - 1, 1);
//else
// materialcode = model.MATERIAL_CODE;
//Pbom pbomcode = new PbomDAL().TJGet(new Pbom { MATERIAL_CODE = materialcode });
//model.PBOM_CODE = pbomcode.PBOM_CODE;
string workcentercode = new WorkCellDAL().GetWorkcenter(model.ORDER_TYPE);
model.WORKCENTER_CODE = workcentercode;
if (model.WORKCENTER_CODE != "")
{ {
var listMatral = new TJDoorPlankPlanDAL(); string factory = new FactoryDAL().GetFactoryWithWorkcenter(model.WORKCENTER_CODE);
var ListMachine = listMatral.GetListMachine(model.MATERIAL_CODE); model.FACTORY_CODE = factory;
foreach (var Machint in ListMachine)
{
model.PID = Guid.NewGuid().ToString();
model.PLAN_STATE = "0";
model.PLANSOURCE = model.PLANSOURCE;
model.MATERIAL_CODE = Machint.MATERIALNO;
model.MATERIAL_NAME = Machint.MATERIALNAME;
Pbom pbomcode = new PbomDAL().Get(new Pbom { MATERIAL_CODE = Machint.MATERIALNO });
model.PBOM_CODE = pbomcode.PBOM_CODE;
string workcentercode = new WorkCellDAL().GetWorkcenter(model.ORDER_TYPE);
model.WORKCENTER_CODE = workcentercode;
if (model.WORKCENTER_CODE != "")
{
string factory = new FactoryDAL().GetFactoryWithWorkcenter(model.WORKCENTER_CODE);
model.FACTORY_CODE = factory;
}
QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(Machint.MATERIALNO);
//QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
model.ROUTE_CODE = routecode != null ? routecode.ROUTE_CODE : "";
model.CREATEUSER = this.LoginUser.UserID;
model.CREATEDATE = DateTime.Now;
model.UPDATEUSER = model.CREATEUSER;
model.UPDATEDATE = model.CREATEDATE;
DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
FISPlan condition = new FISPlan();
condition.PREFIX = "DP";
condition.DATASTR = model.PLAN_DATE.ToString("yyyyMMdd");
//获取流水号
FISPlan info = this.GetOrderPlanSeq(condition);
//计划单号
model.PLAN_SEQ = info.SEQSTR;
model.PLAN_NO = condition.PREFIX + condition.DATASTR + info.SEQSTR;
result.Result = new DoorPlankPlanDAL().Insert(model);
}
}
else
{
model.PID = Guid.NewGuid().ToString();
model.PLAN_STATE = "0";
model.PLANSOURCE = model.PLANSOURCE;
Pbom pbomcode = new PbomDAL().Get(new Pbom { MATERIAL_CODE = model.MATERIAL_CODE });
model.PBOM_CODE = pbomcode.PBOM_CODE;
string workcentercode = new WorkCellDAL().GetWorkcenter(model.ORDER_TYPE);
model.WORKCENTER_CODE = workcentercode;
if (model.WORKCENTER_CODE != "")
{
string factory = new FactoryDAL().GetFactoryWithWorkcenter(model.WORKCENTER_CODE);
model.FACTORY_CODE = factory;
}
QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
//QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
model.ROUTE_CODE = routecode != null ? routecode.ROUTE_CODE : "";
model.CREATEUSER = this.LoginUser.UserID;
model.CREATEDATE = DateTime.Now;
model.UPDATEUSER = model.CREATEUSER;
model.UPDATEDATE = model.CREATEDATE;
DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
FISPlan condition = new FISPlan();
condition.PREFIX = "DP";
condition.DATASTR = model.PLAN_DATE.ToString("yyyyMMdd");
//获取流水号
FISPlan info = this.GetOrderPlanSeq(condition);
//计划单号
model.PLAN_SEQ = info.SEQSTR;
model.PLAN_NO = condition.PREFIX + condition.DATASTR + info.SEQSTR;
result.Result = new DoorPlankPlanDAL().Insert(model);
} }
QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
//QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
model.ROUTE_CODE = "DP_ASSEMBLY_770B";
model.CREATEUSER = this.LoginUser.UserID;
model.CREATEDATE = DateTime.Now;
model.UPDATEUSER = model.CREATEUSER;
model.UPDATEDATE = model.CREATEDATE;
DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
FISPlan condition = new FISPlan();
condition.PREFIX = "DP";
condition.DATASTR = model.PLAN_DATE.ToString("yyyyMMdd");
//获取流水号
FISPlan info = this.GetOrderPlanSeq(condition);
//计划单号
model.PLAN_SEQ = info.SEQSTR;
model.PLAN_NO = condition.PREFIX + condition.DATASTR + info.SEQSTR;
result.Result = new DoorPlankPlanDAL().Insert(model);
//if (model.MATERIAL_CODE.Length <= 10)
//{
// //var listMatral = new TJDoorPlankPlanDAL();
// //var ListMachine = listMatral.GetListMachine(model.MATERIAL_CODE);
// foreach (var Machint in ListMachine)
// {
// model.PID = Guid.NewGuid().ToString();
// model.PLAN_STATE = "0";
// model.PLANSOURCE = model.PLANSOURCE;
// model.MATERIAL_CODE = Machint.MATERIALNO;
// model.MATERIAL_NAME = Machint.MATERIALNAME;
// Pbom pbomcode = new PbomDAL().Get(new Pbom { MATERIAL_CODE = Machint.MATERIALNO });
// model.PBOM_CODE = pbomcode.PBOM_CODE;
// string workcentercode = new WorkCellDAL().GetWorkcenter(model.ORDER_TYPE);
// model.WORKCENTER_CODE = workcentercode;
// if (model.WORKCENTER_CODE != "")
// {
// string factory = new FactoryDAL().GetFactoryWithWorkcenter(model.WORKCENTER_CODE);
// model.FACTORY_CODE = factory;
// }
// QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(Machint.MATERIALNO);
// //QMAPP.MD.Entity.ProcessRoute routecode = new QMAPP.MD.DAL.ProcessRouteDAL().RouteWithMaterial(model.MATERIAL_CODE);
// model.ROUTE_CODE = routecode != null ? routecode.ROUTE_CODE : "";
// model.CREATEUSER = this.LoginUser.UserID;
// model.CREATEDATE = DateTime.Now;
// model.UPDATEUSER = model.CREATEUSER;
// model.UPDATEDATE = model.CREATEDATE;
// DoorPlankPlanDAL cmdDAL = new DoorPlankPlanDAL();
// FISPlan condition = new FISPlan();
// condition.PREFIX = "DP";
// condition.DATASTR = model.PLAN_DATE.ToString("yyyyMMdd");
// //获取流水号
// FISPlan info = this.GetOrderPlanSeq(condition);
// //计划单号
// model.PLAN_SEQ = info.SEQSTR;
// model.PLAN_NO = condition.PREFIX + condition.DATASTR + info.SEQSTR;
// result.Result = new DoorPlankPlanDAL().Insert(model);
// }
//}
//else
//{
//}
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -785,6 +792,310 @@ namespace QMAPP.FJC.BLL.FIS
} }
#endregion #endregion
#region 发布
/// <summary>
/// 发布信息
/// </summary>
/// <param name=""></param>
/// <returns>发布个数</returns>
public DataResult<int> TJPutOut(string strs)
{
string[] list = strs.Split(":".ToCharArray());
DataResult<int> result = new DataResult<int>();
try
{
OrderPlanDAL orderPlandal = new OrderPlanDAL();
List<OrderPlan> validorderPlanList = new List<OrderPlan>();
List<OrderPlan> putOutPlanList = new List<OrderPlan>();
foreach (string str in list)
{
OrderPlan op = orderPlandal.Get(new OrderPlan { PID = str });
if (op.PLAN_STATE != EnumGeter.PLANSTATE.INIT.GetHashCode().ToString())
{
validorderPlanList.Add(op);
}
putOutPlanList.Add(op);
}
if (validorderPlanList.Count > 0)
{
result.IsSuccess = false;
result.Msg = "只有初始状态下的订单能够进行发布!";
return result;
}
DataTable totalDt = GetWorkOrderTable();
foreach (var op in putOutPlanList)
{
op.PLAN_STATE = EnumGeter.PLANSTATE.COMMIT.GetHashCode().ToString();
op.UPDATEUSER = this.LoginUser.UserID;
totalDt = this.TJPutOutOrderPlan(op, totalDt);
}
using (IDataSession session = AppDataFactory.CreateMainSession())
{
IDbConnection dbConn = DbManager.MainConnectionInfo.Connection;
if (dbConn.State == ConnectionState.Closed)
{
dbConn.Open();
}
IDbTransaction ids = dbConn.BeginTransaction();
orderPlandal.BaseSession = session;
foreach (var op in putOutPlanList)
{
orderPlandal.Update(op);
}
session.DbHelper.BulkCopyData(totalDt, "T_PP_WORKORDER", dbConn, ids);
ids.Commit();
}
result.IsSuccess = true;
return result;
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary>
/// 发布信息
/// </summary>
/// <param name="">信息</param>
/// <returns>发布个数</returns>
public DataTable TJPutOutOrderPlan(OrderPlan info, DataTable workOrderDt)
{
WorkCellDAL workCelldal = new WorkCellDAL();
var dicPRI = new DictManageBLL(Dict.DictKind.ORDERPRI);
//if (list.Count <= 0)
//{
// return null;
//}
if ((info.MATERIAL_CODE.Substring(0,4) == "018D"&& info.MATERIAL_CODE.Length > 10)|| (info.MATERIAL_CODE.Substring(0, 3) == "770" && info.MATERIAL_CODE.Length > 7)|| info.MATERIAL_CODE.Length>=14)
{
string pbomcode = info.MATERIAL_CODE;
List<ProcessRouteWorkCellSeq> list = workCelldal.GetFirstWorkCell(pbomcode);
//左前、右前、左后、右后
for (int i = 0; i < info.QTY; i++)
{
DataRow workOrder = workOrderDt.NewRow();
workOrder["PID"] = Guid.NewGuid().ToString();
workOrder["ORDERPLANID"] = info.PID;
workOrder["ORDERPLAN_NO"] = (info.PLAN_NO.ToString() + (i + 1).ToString().PadLeft(4, '0'));
workOrder["ORDER_TYPE"] = info.PLANSOURCE;
workOrder["SEQ"] = (i + 1).ToString().PadLeft(6, '0');
if (info.PLANSOURCE == EnumGeter.WORKORDERTYPE.INSERT.GetHashCode().ToString())
{
workOrder["SEQ"] = info.PLAN_SEQ + (i + 1).ToString().PadLeft(3, '0');
}
workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE;
workOrder["PBOM_CODE"] = info.MATERIAL_CODE;
workOrder["QTY"] = 1;
workOrder["COMPLETE_QTY"] = 0;
workOrder["PLAN_DATE"] = info.PLAN_DATE;
workOrder["SHIFT_CODE"] = info.SHIFT_CODE;
workOrder["WORKCENTER_CODE"] = info.WORKCENTER_CODE;
workOrder["WORKCELL_CODE"] = "PREPARE1";
workOrder["WORKLOC_CODE"] = "";
workOrder["REMARK"] = "";
workOrder["EQPT_NAME"] = "";
workOrder["EQPT_CODE"] = "";
workOrder["STATE"] = EnumGeter.WORKPLANSTATE.INIT.GetHashCode().ToString();
workOrder["PRI"] = dicPRI.GetDictValue(info.PLANSOURCE);
workOrderDt.Rows.Add(workOrder);
}
}
else
{
//左侧、右侧 或 四个门一起打印
var list2 = "".Split(',');
var dal = new TJDoorPlankPlanDAL();
var MachineList = dal.GetListMachine(info.MATERIAL_CODE);
if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L")
{
list2 = "FL,RL".Split(',');
}
else if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
{
list2 = "FR,RR".Split(',');
}
else if ((info.MATERIAL_CODE.Length == 6 && info.MATERIAL_CODE.Substring(0,3) == "770")|| (info.MATERIAL_CODE.Length == 8 && info.MATERIAL_CODE.Substring(0, 4) == "018D"))
{
list2 = "FL,RL,FR,RR".Split(',');
}
for (int i = 0; i < info.QTY; i++)
{
foreach (var seq in list2)
{
DataRow workOrder = workOrderDt.NewRow();
workOrder["PID"] = Guid.NewGuid().ToString();
workOrder["ORDERPLANID"] = info.PID;
workOrder["ORDERPLAN_NO"] = (info.PLAN_NO.ToString() + (i + 1).ToString().PadLeft(4, '0'));
workOrder["ORDER_TYPE"] = info.PLANSOURCE;
workOrder["SEQ"] = (i + 1).ToString().PadLeft(6, '0');
if (info.PLANSOURCE == EnumGeter.WORKORDERTYPE.INSERT.GetHashCode().ToString())
{
workOrder["SEQ"] = info.PLAN_SEQ + (i + 1).ToString().PadLeft(3, '0');
}
//var BOMCODE = "";
//if (info.MATERIAL_CODE.Substring(0, 4) == "018D")
//{
// if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L" || info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
// {
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// BOMCODE = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// }
// else
// {
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE + "-" + seq;
// BOMCODE = info.MATERIAL_CODE + "-" + seq;
// }
//}
//else if (info.MATERIAL_CODE.Substring(0, 3) == "770")
//{
// if (info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "L" || info.MATERIAL_CODE.Substring(info.MATERIAL_CODE.Length - 1, 1) == "R")
// {
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// BOMCODE = info.MATERIAL_CODE.Substring(0, info.MATERIAL_CODE.Length - 1) + seq;
// }
// else
// {
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE + seq;
// BOMCODE = info.MATERIAL_CODE + seq;
// }
//}
//else
//{
// workOrder["MATERIAL_CODE"] = info.MATERIAL_CODE;
// BOMCODE = info.MATERIAL_CODE;
//}
var WEIZHI = "";
switch (seq)
{
case "LF":
WEIZHI = "左前";
break;
case "FL":
WEIZHI = "左前";
break;
case "LR":
WEIZHI = "左后";
break;
case "RL":
WEIZHI = "左后";
break;
case "RF":
WEIZHI = "右前";
break;
case "FR":
WEIZHI = "右前";
break;
case "RR":
WEIZHI = "右后";
break;
}
var Machine = MachineList.Where(p => p.MATERIALNAME.Contains(WEIZHI)).ToList();
if (Machine != null && Machine.Count > 0)
{
workOrder["MATERIAL_CODE"] = Machine[0].MATERIALNO;
workOrder["PBOM_CODE"] = Machine[0].MATERIALNO;
}
else
{
workOrder["PBOM_CODE"] = "";
workOrder["MATERIAL_CODE"] = "";
}
workOrder["QTY"] = 1;
workOrder["COMPLETE_QTY"] = 0;
workOrder["PLAN_DATE"] = info.PLAN_DATE;
workOrder["SHIFT_CODE"] = info.SHIFT_CODE;
workOrder["WORKCENTER_CODE"] = info.WORKCENTER_CODE;
workOrder["WORKCELL_CODE"] = "PREPARE1";
workOrder["WORKLOC_CODE"] = "";
workOrder["REMARK"] = "";
workOrder["EQPT_NAME"] = "";
workOrder["EQPT_CODE"] = "";
workOrder["STATE"] = EnumGeter.WORKPLANSTATE.INIT.GetHashCode().ToString();
workOrder["PRI"] = dicPRI.GetDictValue(info.PLANSOURCE);
workOrderDt.Rows.Add(workOrder);
}
}
}
//注入派工单信息
return workOrderDt;
}
public List<WorkOrder> TJPutOutOrderPlan(OrderPlan info, int number, int lastIndex)
{
List<WorkOrder> wolist = new List<WorkOrder>();
WorkCellDAL workCelldal = new WorkCellDAL();
string pbomcode = info.PBOM_CODE;
List<QMAPP.MD.Entity.ProcessRouteWorkCellSeq> list = workCelldal.GetFirstWorkCell(pbomcode);
var dicPRI = new DictManageBLL(Dict.DictKind.ORDERPRI);
//注入派工单信息
for (int i = 0; i < number; i++)
{
foreach (var seq in list)
{
WorkOrder wo = new WorkOrder();
wo.PID = Guid.NewGuid().ToString();
wo.ORDERPLANID = info.PID;
wo.ORDERPLAN_NO = (info.PLAN_NO.ToString() + (i + 1 + lastIndex).ToString().PadLeft(4, '0'));
wo.ORDER_TYPE = info.PLANSOURCE;
wo.SEQ = (i + 1 + lastIndex).ToString().PadLeft(6, '0');
wo.MATERIAL_CODE = info.MATERIAL_CODE;
wo.PBOM_CODE = info.PBOM_CODE;
wo.QTY = 1;
wo.COMPLETE_QTY = 0;
wo.PLAN_DATE = info.PLAN_DATE;
wo.SHIFT_CODE = info.SHIFT_CODE;
wo.WORKCENTER_CODE = info.WORKCENTER_CODE;
wo.WORKCELL_CODE = seq.WORKCELL_CODE;
wo.WORKLOC_CODE = "";
wo.REMARK = "";
wo.EQPT_NAME = "";
wo.EQPT_CODE = "";
wo.STATE = Convert.ToInt32(EnumGeter.WORKPLANSTATE.INIT.GetHashCode().ToString());
wo.PRI = Convert.ToInt32(dicPRI.GetDictValue(info.PLANSOURCE));
wo.PRINTED = "0";
wolist.Add(wo);
}
}
return wolist;
}
#endregion
#region 导出数据 #region 导出数据
/// <summary> /// <summary>
/// 获取导出的数据 /// 获取导出的数据

6
APPQ5/QMAPP.FJC.BLL/TianJin/StorageBLL.cs

@ -192,7 +192,7 @@ namespace QMAPP.FJC.BLL.TianJin
if (!string.IsNullOrEmpty(model.PID)) if (!string.IsNullOrEmpty(model.PID))
{ {
info = new StorageDAL().GetPID(model.ProductCode); info = new StorageDAL().GetPID(model.PID);
} }
//条码涉及到返迁入库,条码会有重复的可能 //条码涉及到返迁入库,条码会有重复的可能
@ -209,6 +209,8 @@ namespace QMAPP.FJC.BLL.TianJin
{ {
info.UPDATEDATE = DateTime.Now.ToString(); info.UPDATEDATE = DateTime.Now.ToString();
info.UPDATEUSER = this.LoginUser.UserName; info.UPDATEUSER = this.LoginUser.UserName;
info.State = model.State;
temp = new StorageDAL().Update(info); temp = new StorageDAL().Update(info);
var storageLog2 = new StorageLog(); var storageLog2 = new StorageLog();
@ -217,7 +219,7 @@ namespace QMAPP.FJC.BLL.TianJin
storageLog2.CREATEDATE = DateTime.Now.ToString(); storageLog2.CREATEDATE = DateTime.Now.ToString();
storageLog2.UPDATEUSER = info.CREATEUSER; storageLog2.UPDATEUSER = info.CREATEUSER;
storageLog2.UPDATEDATE = info.CREATEDATE; storageLog2.UPDATEDATE = info.CREATEDATE;
storageLog2.State = "2"; storageLog2.State = model.State;
storageLog2.ProductCode = info.ProductCode; storageLog2.ProductCode = info.ProductCode;
storageLog2.MATERIALCODE = info.MATERIALCODE; storageLog2.MATERIALCODE = info.MATERIALCODE;
storageLog2.MATERIALNAME = info.MATERIALNAME; storageLog2.MATERIALNAME = info.MATERIALNAME;

2
APPQ5/QMAPP.FJC.Web/Controllers/TJDoorPlankPlanPrintController.cs

@ -309,7 +309,7 @@ namespace QMAPP.FJC.Web.Controllers
string selectKey = Request.Form["selectKey"]; string selectKey = Request.Form["selectKey"];
ServiceAgent wcfAgent = this.GetServiceAgent(); ServiceAgent wcfAgent = this.GetServiceAgent();
DataResult<int> result = new DataResult<int>(); DataResult<int> result = new DataResult<int>();
result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_PutOut", selectKey); result = wcfAgent.InvokeServiceFunction<DataResult<int>>("DoorPlankPlanBLL_TJPutOut", selectKey);
if (result.IsSuccess == false) if (result.IsSuccess == false)
{ {
SetMessage(result.Msg); SetMessage(result.Msg);

12
APPQ5/QMAPP.WinForm/App.config

@ -7,6 +7,9 @@
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/> <!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>--> <add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.99;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=.;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/> <!--<add name="maindb" connectionString="Data Source=.;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=.;Initial Catalog=BZD;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>--> <add name="maindbBZD" connectionString="Data Source=.;Initial Catalog=BZD;User Id=sa;Password=Microsoft2008;" providerName="System.Data.SqlClient"/>-->
@ -203,15 +206,10 @@
</netTcpBinding> </netTcpBinding>
</bindings> </bindings>
<client> <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.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://127.0.0.1:4444/OpcService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IOpcService" contract="ServiceOpc.IOpcService" name="NetTcpBinding_IOpcService" />
<!--<endpoint address="net.tcp://127.0.0.1:4444/OpcService" binding="netTcpBinding" bindingConfiguration="NetTcpBinding_IOpcService" contract="ServiceOpc.IOpcService" name="NetTcpBinding_IOpcService" />-->
<endpoint address="net.tcp://10.111.144.97: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/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" /> <endpoint address="http://localhost:8938/LoginService.svc" binding="basicHttpBinding" bindingConfiguration="BasicHttpBinding_IGeneralService" contract="LoginService.ILoginService" name="BasicHttpBinding_ILoginService" />

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

@ -156,7 +156,7 @@ namespace QMAPP.WinForm.Forms.TianJin
var setting = new var setting = new
{ {
ListRowcount = int.Parse(cbListRowcount.Text), ListRowcount = int.Parse(cbListRowcount.Text),
//RefreshRate = int.Parse(cbRefreshRate.Text.Trim('s')), RefreshRate = int.Parse("20"),
//PlanFilter = cbPlanFilter.SelectedIndex //PlanFilter = cbPlanFilter.SelectedIndex
}; };
string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting); string settingstring = Newtonsoft.Json.JsonConvert.SerializeObject(setting);

6
ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

@ -64,8 +64,12 @@
<!--主数据库连接--> <!--主数据库连接-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=CDmes123;max pool size=10240;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=10.111.144.98;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.98;Initial Catalog=BZD;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=CDmes123;max pool size=10240;" providerName="System.Data.SqlClient"/>-->
<!--<add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />--> <!--<add name="maindb" connectionString="Data Source=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />-->

Loading…
Cancel
Save