Browse Source

调整时间验证

master
songnan.zhang 2 years ago
parent
commit
5dd5112156
  1. 6
      APP/QMAPP.Web/Web.config
  2. 47
      APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs
  3. 5
      APPQ5/QMAPP.FJC.BLL/FIS/FISPhraseBLL.cs
  4. 14
      APPQ5/QMAPP.FJC.DAL/FIS/FISPhraseDAL.cs
  5. 4
      APPQ5/QMAPP.FJC.TRACING/DataValidators/TimeValidator.cs
  6. 6
      APPQ5/QMAPP.WinForm/App.config
  7. 59
      APPQ5/QMAPP.WinForm/Forms/TianJin/PlanRePrintForm.cs
  8. 17
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs
  9. 4
      APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs
  10. 6
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/Web.config

6
APP/QMAPP.Web/Web.config

@ -49,15 +49,15 @@
<add name="maindb" connectionString="Data Source=10.122.213.104;Initial Catalog=ADIENT_VW276_MES;User Id=MES;Password=Password1;" providerName="System.Data.SqlClient"/>
-->
<!--<add name="maindb" connectionString="Data Source=119.3.213.202,13315;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=ChangkeTec@2020;" providerName="System.Data.SqlClient"/>-->
<add name="maindb" connectionString="Data Source=119.3.213.202,13315;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=ChangkeTec@2020;" 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=123.56.115.74;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=qwe123$%^;" providerName="System.Data.SqlClient" />
-->
<!--<add name="maindb" connectionString="Data Source=dev.ccwin-in.com,6191;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=Microsoft@2021;" 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"/>-->

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

@ -241,14 +241,30 @@ namespace QMAPP.FJC.BLL.FIS
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;
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")
{
if (model.MATERIAL_CODE.Contains("018D"))
{
materialcode = model.MATERIAL_CODE;
}
else
{
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);
if (model.MATERIAL_CODE.Contains("018D"))
workcentercode = workcentercode.Replace("770B","018D");
model.WORKCENTER_CODE = workcentercode;
if (model.WORKCENTER_CODE != "")
{
@ -264,9 +280,20 @@ namespace QMAPP.FJC.BLL.FIS
foreach (var MA in ListMachine)
{
if (MA.MATERIALNAME.Contains("左"))
model.ROUTE_CODE = "DP_L_ASSEMBLY_770B";
else if(MA.MATERIALNAME.Contains("右"))
model.ROUTE_CODE = "DP_R_ASSEMBLY_770B";
{
if (model.MATERIAL_CODE.Contains("018"))
model.ROUTE_CODE = "DP_L_ASSEMBLY_018D";
else
model.ROUTE_CODE = "DP_L_ASSEMBLY_770B";
}
else if (MA.MATERIALNAME.Contains("右"))
{
if (model.MATERIAL_CODE.Contains("018"))
model.ROUTE_CODE = "DP_R_ASSEMBLY_018D";
else
model.ROUTE_CODE = "DP_R_ASSEMBLY_770B";
}
}
//model.ROUTE_CODE = "DP_ASSEMBLY_770B";

5
APPQ5/QMAPP.FJC.BLL/FIS/FISPhraseBLL.cs

@ -14,6 +14,11 @@ namespace QMAPP.FJC.BLL.FIS
return new DAL.FIS.FISPhraseDAL().GetFisPhraseBook(assymaterialcode, positioncode);
}
public FISPhraseBook GetPHRASEBOOK(string Code)
{
return new DAL.FIS.FISPhraseDAL().GetPHRASEBOOK(Code);
}
public List<FISAssembly> GetAssemblyList(FISAssembly condation)
{
return new DAL.FIS.FISPhraseDAL().GetAssemblyList(condation);

14
APPQ5/QMAPP.FJC.DAL/FIS/FISPhraseDAL.cs

@ -86,6 +86,20 @@ namespace QMAPP.FJC.DAL.FIS
}
}
public FISPhraseBook GetPHRASEBOOK(string Code)
{
StringBuilder sql = new StringBuilder();
sql.AppendLine("SELECT Text ");
sql.AppendLine("FROM T_FIS_PHRASEBOOK ");
sql.AppendLine($"WHERE Code = '{Code}' ");
using (IDataSession session = AppDataFactory.CreateMainSession())
{
List<DataParameter> parameters = new List<DataParameter>();
return session.Get<FISPhraseBook>(sql.ToString(), parameters.ToArray());
}
}
public List<FISAssembly> GetAssemblyList(FISAssembly condation)
{
List<DataParameter> parameters = new List<DataParameter>();

4
APPQ5/QMAPP.FJC.TRACING/DataValidators/TimeValidator.cs

@ -31,6 +31,10 @@ namespace QMAPP.FJC.TRACING.DataValidators
else
{
var preStatTime = DateTime.Now;
if (!DateTime.TryParse(dataRow["CheckColumnValue"].ToString(), out preStatTime))
{
return new ValidateResult(false, $"检测值CheckColumnValue必须是DateTime类型");
}
DateTime serviceTime = dal.GetServiceDateTime();
TimeSpan ts = serviceTime.Subtract(preStatTime);

6
APPQ5/QMAPP.WinForm/App.config

@ -2,11 +2,11 @@
<configuration>
<connectionStrings>
<!--主数据库连接-->
<!--
<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=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"/>-->
@ -24,7 +24,7 @@
<add name="maindb" connectionString="Data Source=10.122.213.104;Initial Catalog=ADIENT_VW276_MES;User Id=MES;Password=Password1;" 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>

59
APPQ5/QMAPP.WinForm/Forms/TianJin/PlanRePrintForm.cs

@ -68,6 +68,9 @@ namespace QMAPP.WinForm.Forms.TianJin
labeldata.Class = " " + book.Class.Substring(0, 2);
labeldata.Description = book.Text;
labeldata.OrderNo = book.CarModel + positioncode + data;
var bookS = _agent.InvokeServiceFunction<FJC.Entity.FIS.FISPhraseBook>("FISPhraseBLL_GetPHRASEBOOK", labeldata.Class.Trim());
labeldata.Remark = bookS.Text;
}
var mcresult = _agent.InvokeServiceFunction<DataResult<Material>>("MaterialBLL_Get", new Material { MATERIAL_CODE = MATERIAL_CODE });
var material = mcresult.IsSuccess ? mcresult.Result : null;
@ -114,7 +117,7 @@ namespace QMAPP.WinForm.Forms.TianJin
}
//OrderNo,OrderType,PlanDate,Name,Class,CarModel,Text1,Text2,Text3,Text4,Text5,Text6
dataline.AppendFormat("\"{0}\",\"{1}\",\"{2:yyyy-MM-dd HH:mm:ss}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\",\"{7}\",\"{8}\",\"{9}\",\"{10}\",\"{11}\",\"{12}\",\"{13}\",\"{14}\"\r\n",
dataline.AppendFormat("\"{0}\",\"{1}\",\"{2:yyyy-MM-dd HH:mm:ss}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\",\"{7}\",\"{8}\",\"{9}\",\"{10}\",\"{11}\",\"{12}\",\"{13}\",\"{14}\",\"{15}\"\r\n",
label.OrderNo,//计划号
label.OrderType,//计划类型(0:FIS,1:STOCK,2:INSERT)
label.PlanDate,//计划日期
@ -129,7 +132,8 @@ namespace QMAPP.WinForm.Forms.TianJin
texts[5],//装配详细信息
texts[6],//装配详细信息
texts[7],//装配详细信息
label.MATERIALCODE//
label.MATERIALCODE,//
label.Remark
);
if (label.OrderNo.Contains("018D"))
{
@ -156,56 +160,7 @@ namespace QMAPP.WinForm.Forms.TianJin
#endregion
}
//private void PrintLabel(List<LabelData> labeldata)
//{
// #region 计划标签打印
// //string xmlPath = System.Configuration.ConfigurationSettings.AppSettings["XmlName"].ToString(); ;
// //BarcodeLib.BarCodeGenerate g = new BarcodeLib.BarCodeGenerate( xmlPath);
// //bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE);
// QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo();
// StringBuilder dataline = new StringBuilder();
// foreach (var label in labeldata)
// {
// string[] texts = new string[6];
// var sourcetext = label.Description.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
// for (int i = 0; i < texts.Length && i < sourcetext.Length; i++)
// {
// texts[i] = sourcetext[i];
// }
// //OrderNo,OrderType,PlanDate,Name,Class,CarModel,Text1,Text2,Text3,Text4,Text5,Text6
// dataline.AppendFormat("\"{0}\",\"{1}\",\"{2:yyyy-MM-dd HH:mm:ss}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\",\"{7}\",\"{8}\",\"{9}\",\"{10}\",\"{11}\",\"{12}\"\r\n",
// label.OrderNo,//计划号
// label.OrderType,//计划类型(0:FIS,1:STOCK,2:INSERT)
// label.PlanDate,//计划日期
// label.MaterialName,//总成物料名称
// label.Class,//
// label.CarModel,//车型
// texts[0],//装配详细信息
// texts[1],//装配详细信息
// texts[2],//装配详细信息
// texts[3],//装配详细信息
// texts[4],//装配详细信息
// texts[5],//装配详细信息
// label.MATERIALCODE//
// );
// }
// ll.BarCode = dataline.ToString().TrimEnd('\r', '\n');
// ll.PrinterName = "";
// QM.Assist.PrintUtil.LabelList2.Add(ll);
// QM.Assist.PrintUtil pu = new QM.Assist.PrintUtil();
// pu.PrintLabel2(System.Configuration.ConfigurationManager.AppSettings["proPath"].ToString
// (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelTMPPath"].ToString
// (), System.Configuration.ConfigurationManager.AppSettings["PlanLabelDATPath"].ToString
// ());
// #endregion
//}
public string GetNameCode(string Name)
{

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

@ -231,7 +231,7 @@ namespace QMAPP.WinForm.Forms.TianJin
}
//OrderNo,OrderType,PlanDate,Name,Class,CarModel,Text1,Text2,Text3,Text4,Text5,Text6
dataline.AppendFormat("\"{0}\",\"{1}\",\"{2:yyyy-MM-dd HH:mm:ss}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\",\"{7}\",\"{8}\",\"{9}\",\"{10}\",\"{11}\",\"{12}\",\"{13}\",\"{14}\"\r\n",
dataline.AppendFormat("\"{0}\",\"{1}\",\"{2:yyyy-MM-dd HH:mm:ss}\",\"{3}\",\"{4}\",\"{5}\",\"{6}\",\"{7}\",\"{8}\",\"{9}\",\"{10}\",\"{11}\",\"{12}\",\"{13}\",\"{14}\",\"{15}\"\r\n",
label.OrderNo,//计划号
label.OrderType,//计划类型(0:FIS,1:STOCK,2:INSERT)
label.PlanDate,//计划日期
@ -246,7 +246,8 @@ namespace QMAPP.WinForm.Forms.TianJin
texts[5],//装配详细信息
texts[6],//装配详细信息
texts[7],//装配详细信息
label.MATERIALCODE//
label.MATERIALCODE,//
label.Remark
);
if (label.OrderNo.Contains("018D"))
{
@ -538,6 +539,11 @@ namespace QMAPP.WinForm.Forms.TianJin
labeldata.Class = " " + book.CarModel.Substring(book.CarModel.Length-3, 3);
labeldata.Description = book.Text;
labeldata.OrderNo = book.CarModel + positioncode + data;
if (orders[0].MATERIAL_CODE.Contains("018D"))
{
var bookS = _agent.InvokeServiceFunction<FJC.Entity.FIS.FISPhraseBook>("FISPhraseBLL_GetPHRASEBOOK", labeldata.Class.Trim());
labeldata.Remark = bookS.Text;
}
}
var mcresult = _agent.InvokeServiceFunction<DataResult<Material>>("MaterialBLL_Get", new Material { MATERIAL_CODE = orders[0].MATERIAL_CODE });
var material = mcresult.IsSuccess ? mcresult.Result : null;
@ -550,7 +556,7 @@ namespace QMAPP.WinForm.Forms.TianJin
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始打印" + labeldata.OrderNo);
// PrintLabel(labels);
//PrintLabel(labels);
WriteLog.Write(System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + " 开始变成打印状态" + labeldata.OrderNo);
@ -723,6 +729,9 @@ namespace QMAPP.WinForm.Forms.TianJin
labeldata.Class = " " + book.Class.Substring(0, 2);
labeldata.Description = book.Text;
labeldata.OrderNo = book.CarModel + positioncode + data;
var bookS = _agent.InvokeServiceFunction<FJC.Entity.FIS.FISPhraseBook>("FISPhraseBLL_GetPHRASEBOOK", labeldata.Class.Trim());
labeldata.Remark = bookS.Text;
}
var mcresult = _agent.InvokeServiceFunction<DataResult<Material>>("MaterialBLL_Get", new Material { MATERIAL_CODE = orders[0].MATERIAL_CODE });
var material = mcresult.IsSuccess ? mcresult.Result : null;
@ -800,5 +809,7 @@ namespace QMAPP.WinForm.Forms.TianJin
public string CarModel { get; set; }
public object[] OrderType { get; set; }
public string Remark { get; set; }
}
}

4
APPQ5/QMAPP.WinForm/Properties/AssemblyInfo.cs

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// 可以指定所有这些值,也可以使用“内部版本号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2022.10.26.01")]
[assembly: AssemblyFileVersion("2022.10.26.01")]
[assembly: AssemblyVersion("2022.12.16.01")]
[assembly: AssemblyFileVersion("2022.12.16.01")]

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

@ -63,9 +63,9 @@
<connectionStrings>
<!--主数据库连接-->
<!--
<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"/>
@ -86,7 +86,7 @@
<!--<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=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.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"/>-->

Loading…
Cancel
Save