Browse Source

补充BC316

master
songnan.zhang 3 years ago
parent
commit
8b45c1e0c6
  1. 51
      APPQ5/QMAPP.FJC.DAL/ProductionPlan/WorkOrderDAL.cs
  2. 9
      APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs
  3. 6
      APPQ5/QMAPP.WinForm/App.config
  4. 4
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

51
APPQ5/QMAPP.FJC.DAL/ProductionPlan/WorkOrderDAL.cs

@ -751,6 +751,57 @@ namespace QMAPP.FJC.DAL.ProductionPlan
} }
} }
/// <summary>
/// 获取指定工位第一条的派工单
/// </summary>
/// <param name="workloccode"></param>
/// <returns></returns>
public WorkOrder GetFirstOrderInLoc(string workcellcode, string mouldcode)
{
try
{
List<DataParameter> parameters = new List<DataParameter>();
StringBuilder sql = new StringBuilder();
sql.AppendLine("SELECT TOP 1 W.* ");
sql.AppendLine(" ,P.[IGNORE_FISBREAK] ");
sql.AppendFormat(" FROM [T_PP_WORKORDER] AS W ");
sql.AppendFormat(" LEFT JOIN [T_PP_ORDERPLAN] AS P ");
sql.AppendFormat(" ON P.[PID]=W.[ORDERPLANID] ");
sql.AppendFormat(" LEFT JOIN [T_MD_MATERIAL] AS M ");
sql.AppendFormat(" ON W.[MATERIAL_CODE]=M.[MATERIAL_CODE] ");
sql.AppendFormat(" WHERE W.[WORKCELL_CODE]=@workcellcode ");
//if (mouldcode == "HWL_FRONT") // 左前门
//{
// sql.AppendLine(" and left(W.PBOM_CODE,10) = 'VW331DP_LF'");
//}
//else if (mouldcode == "HWL_REAR") //左后门
//{
// sql.AppendLine(" and left(W.PBOM_CODE,10) = 'VW331DP_LR' ");
//}
//else if (mouldcode == "HWL_FRONT") //右前门
//{
// sql.AppendLine(" and left(W.PBOM_CODE,10) = 'VW331DP_RF' ");
//}
//else if (mouldcode == "HWR_REAR") //右后门
//{
// sql.AppendLine(" and left(W.PBOM_CODE,10) = 'VW331DP_RR' ");
//}
//sql.AppendLine(" AND W.[MOULD_CODE]=@mouldcode ");
sql.AppendLine(" AND W.[STATE]<>'4' ");
sql.AppendFormat(" ORDER BY W.[PRI],W.[PLAN_DATE],P.PLAN_SEQ,W.[SEQ],W.[MATERIAL_CODE] ");
parameters.Add(new DataParameter("workcellcode", workcellcode));
parameters.Add(new DataParameter("mouldcode", mouldcode));
using (var session = AppDataFactory.CreateMainSession())
{
return session.Get<WorkOrder>(sql.ToString(), parameters.ToArray());
}
}
catch (Exception ex)
{
throw ex;
}
}
/// <summary> /// <summary>
/// 获取工序下匹配的派工单 /// 获取工序下匹配的派工单
/// </summary> /// </summary>

9
APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs

@ -22,6 +22,15 @@ namespace QMAPP.FJC.TRACING.DataValidators
var workorderlist = new List<Entity.ProductionPlan.WorkOrder>(); var workorderlist = new List<Entity.ProductionPlan.WorkOrder>();
//获取当前工位正在执行的派工单 //获取当前工位正在执行的派工单
var workorder= workorderdal.GetWorkingOrderInLoc(data.WorkLocState.WORKLOC_CODE,data.MouldCode); var workorder= workorderdal.GetWorkingOrderInLoc(data.WorkLocState.WORKLOC_CODE,data.MouldCode);
//-----------------------------------------------------------------------------------------------
if (data.WorkLocState.WORKCELL_CODE == "ASSEMBLE_BC316")
{
//20210120 DQzhang 获取当前工位第一条派工单
workorder = workorderdal.GetFirstOrderInLoc(data.WorkLocState.WORKCELL_CODE, data.MouldCode);
}
//-----------------------------------------------------------------------------------------------
if (workorder == null) //不存在正在执行的派工单 if (workorder == null) //不存在正在执行的派工单
{ {
//获取当前工序优先级最高的工单 //获取当前工序优先级最高的工单

6
APPQ5/QMAPP.WinForm/App.config

@ -8,10 +8,10 @@
<!--<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"/>-->
<!--<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=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" />-->
</connectionStrings> </connectionStrings>

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

@ -64,9 +64,9 @@
<!--主数据库连接--> <!--主数据库连接-->
<!--<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=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" />-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES9;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>--> <!--<add name="maindb" connectionString="Data Source=10.111.144.99;Initial Catalog=ADIENT_CD_MES9;User Id=sa;Password=Password2018;max pool size=10240;" providerName="System.Data.SqlClient"/>-->

Loading…
Cancel
Save