Browse Source

调整MP3发运同时出库MP4的条码

master
张松男 8 months ago
parent
commit
53cbb39060
  1. 25
      APPQ5/QMAPP.FJC.DAL/FrmPlace/FrmPlaceDAL.cs
  2. 2
      APPQ5/QMAPP.FJC.TRACING/DAHandler/DataAcquirer.cs
  3. 5
      APPQ5/QMAPP.FJC.TRACING/DataValidators/PlanValidator.cs
  4. 8
      APPQ5/QMAPP.WinForm/App.config
  5. 2
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

25
APPQ5/QMAPP.FJC.DAL/FrmPlace/FrmPlaceDAL.cs

@ -910,6 +910,7 @@ namespace QMAPP.FJC.DAL.FrmPlace
ArrayList sqllist = new ArrayList();
ArrayList sqllistMP4 = new ArrayList();
StringBuilder strSql = new StringBuilder();
StringBuilder strFields = new StringBuilder();
StringBuilder strValues = new StringBuilder();
@ -943,7 +944,7 @@ namespace QMAPP.FJC.DAL.FrmPlace
strSql.Append(" (" + strValues.ToString() + ")");
sqllist.Add(strSql.ToString());
List<DataParameter> parameters = new List<DataParameter>();
foreach (EPasteDetailsCard decard in ppastecard.DetailsCardlist)
{
int rowindex = strindex;
@ -954,7 +955,19 @@ namespace QMAPP.FJC.DAL.FrmPlace
sqllist.Add(strinsertsql.ToString());
sqllist.Add(updatesql.ToString());
sqllist.Add(updatesql2.ToString());
sqllist.Add(updatesql3.ToString());
var TABLE = new DataTable();
using (IDataSession session = AppDataFactory.CreateMainSession())
{
TABLE = session.GetTable($"select * from T_AW_PRODUCT where PID = '{decard.PRODUCT_PID}'", parameters.ToArray());
}
if (TABLE.Rows.Count > 0)
{
sqllist.Add(updatesql3.ToString());
}
else
{
sqllistMP4.Add(updatesql3.ToString());
}
strindex++;
}
@ -970,6 +983,14 @@ namespace QMAPP.FJC.DAL.FrmPlace
session.ExecuteSql(sqllist[i].ToString());
}
}
for (var i = 0; i < sqllistMP4.Count; i++)
{
using (IDataSession session = AppDataFactory.CreateSession("maindbBC316_MP4"))
{
session.ExecuteSql(sqllistMP4[i].ToString());
}
}
return reindex;

2
APPQ5/QMAPP.FJC.TRACING/DAHandler/DataAcquirer.cs

@ -82,7 +82,7 @@ namespace QMAPP.FJC.TRACING.DAHandler
if (data.OrderPlan == null)
{
//BC316-MP4 装配首工位 进行计划强校验
if ("AIRBAG_WELD_BC316".Contains(data.MachineCode))
if ("AIRBAG_WELD_BC316,UFRAME_WELD_BC316,ANTENNA_BC316,LFRAME_WELD_BC316,AIRDUCT_WELD_BC316MP4,ASSEMBLE_BC316,ASSEMBLE_BC316_2".Contains(data.MachineCode) && data.MachineName.Contains("MP4"))
{
// QDA3 装配1 强校验第一条计划
var plan = new WorkOrderDAL().GetOrderInCell(data.WorkLocState.WORKCELL_CODE , 1, 1);

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

@ -34,15 +34,14 @@ namespace QMAPP.FJC.TRACING.DataValidators
//--------------------BC316帽檐超声波焊接工位----------------------------------------------------
if (data.WorkLocState.WORKCELL_CODE == "BRIM_WELDING_BC316")
if (data.WorkLocState.WORKCELL_CODE == "BRIM_WELDING_BC316"||("AIRBAG_WELD_BC316,UFRAME_WELD_BC316,ANTENNA_BC316,LFRAME_WELD_BC316,AIRDUCT_WELD_BC316MP4,ASSEMBLE_BC316,ASSEMBLE_BC316_2".Contains(data.MachineCode) && data.MachineName.Contains("MP4")))
{
//20230309 DQzhang 获取当前工位第一条派工单
workorder = workorderdal.GetFirstOrderInLoc(data.WorkLocState.WORKCELL_CODE, data.MouldCode);
}
//-----------------------------------------------------------------------------------------------
if (workorder == null) //不存在正在执行的派工单
{

8
APPQ5/QMAPP.WinForm/App.config

@ -3,15 +3,15 @@
<connectionStrings>
<!--主数据库连接-->
<!--<add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=Password01;" providerName="System.Data.SqlClient"/>
<add name="maindbBZD" connectionString="Data Source=10.111.144.111;Initial Catalog=BZD;User Id=sa;Password=Password01;" 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="maindbBC316_MP4" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" providerName="System.Data.SqlClient"/>-->
<add name="maindbBC316_MP4" connectionString="Data Source=10.111.144.111;Initial Catalog=ADIENT_CD_MES;User Id=CDMESADM;Password=123u3M12912@1;" 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>
<appSettings>

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

@ -80,8 +80,8 @@
<!--
<add name="maindbYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=scCFAACDYBNCSNF;User Id=mesreaderdcs;Password=mesreaderdcs;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=10.111.144.72;Initial Catalog=scCFAACDYBDY;User Id=mesreaderdcs;Password=mesreaderdcs;" 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"/>

Loading…
Cancel
Save