Browse Source

暂存

master
songnan.zhang 2 years ago
parent
commit
cad1c8c205
  1. 6
      APP/QMAPP.Web/Web.config
  2. 4
      APPMD/QMAPP.MD.Web/Web.config
  3. 2
      APPQ5/QMAPP.FJC.BLL/FIS/DoorPlankPlanBLL.cs
  4. 7
      APPQ5/QMAPP.FJC.Web/Web.config
  5. 12
      APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs
  6. 137
      APPQ5/QMAPP.WinForm/Forms/Operation/SignInfoForm.cs
  7. 23
      APPQ5/QMAPP.WinForm/Forms/TianJin/TJPrintPlanLabel.cs
  8. 6
      AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs
  9. 1
      ServicesCenter/Task/QMTask.Host/App.config
  10. 7
      ServicesCenter/WCF/QMFrameWork.WebServiceHost/App_Data/FJCServiceList.xml

6
APP/QMAPP.Web/Web.config

@ -49,8 +49,10 @@
<!--<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"/>
<!--<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="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<!--日志组件配置开始-->

4
APPMD/QMAPP.MD.Web/Web.config

@ -31,9 +31,11 @@
<!--<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=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=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=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=CD_TEST;User Id=sa;Password=Password2018;" providerName="System.Data.SqlClient"/>-->
</connectionStrings>
<!--日志组件配置开始-->

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

@ -238,7 +238,7 @@ namespace QMAPP.FJC.BLL.FIS
try
{
if (model.MATERIAL_CODE.Length <= 8)
if (model.MATERIAL_CODE.Length <= 10)
{
var listMatral = new TJDoorPlankPlanDAL();
var ListMachine = listMatral.GetListMachine(model.MATERIAL_CODE);

7
APPQ5/QMAPP.FJC.Web/Web.config

@ -40,8 +40,11 @@
<!--<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"/>
<!--<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="maindb" connectionString="Data Source=10.117.133.48;Initial Catalog=ADIENT_TJ_MES;User Id=sa;Password=ASDqwe123!@#;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<!--日志组件配置开始-->
<log4net>

12
APPQ5/QMAPP.WinForm/Forms/Operation/OperationForm.cs

@ -109,6 +109,11 @@ namespace QMAPP.WinForm.Forms.Operation
private string _DeleteProductLoc = string.Empty; //撤销按钮删除产品信息触发工位
private string _DeleteProductDaiCode = string.Empty; //撤销按钮删除产品信息触发采集点
/// <summary>
///
/// </summary>
public MachineInfo _SignMachineInfo = new MachineInfo();
#endregion
#region 窗体构造函数
@ -183,6 +188,8 @@ namespace QMAPP.WinForm.Forms.Operation
//页面初始化
Init();
_SignMachineInfo = _operationServiceParam.machineInfo;
//tsbRe.Visible = false;
DGViewProList.ClearSelection();
@ -3632,6 +3639,11 @@ namespace QMAPP.WinForm.Forms.Operation
/// <param name="e"></param>
private void btnSignInfo_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(_operationServiceParam.machineInfo.MACHINECODDE))
{
MessageBox.Show("请先选择工位!");
return;
}
SignInfoForm frm = new SignInfoForm(this);
frm.ShowDialog();
}

137
APPQ5/QMAPP.WinForm/Forms/Operation/SignInfoForm.cs

@ -10,17 +10,23 @@ using QMAPP.Entity;
namespace QMAPP.WinForm.Forms.Operation
{
/// <summary>
///
/// </summary>
public partial class SignInfoForm : Form
{
//获取服务代理
QMAPP.ServicesAgent.ServiceAgent _agent = ClientContext.GetServiceAgent();
List<BZDConfig> _bzdConfig = null;
List<Config> _bzdConfig = null;
private SignInfo signInfo = new SignInfo();
Product _CurrentProduct = null;
private OperationForm _parentForm;
private OperationForm_316 operationForm_316;
/// <summary>
///
/// </summary>
/// <param name="parentForm"></param>
public SignInfoForm(OperationForm parentForm)
{
InitializeComponent();
@ -29,11 +35,6 @@ namespace QMAPP.WinForm.Forms.Operation
_parentForm = parentForm;
}
public SignInfoForm(OperationForm_316 operationForm_316)
{
this.operationForm_316 = operationForm_316;
}
#region 打印按钮
/// <summary>
@ -46,92 +47,27 @@ namespace QMAPP.WinForm.Forms.Operation
try
{
if (string.IsNullOrWhiteSpace(cbMaterial.Text))
{
infolabel.Text = "请选择总成零件号!";
cbMaterial.Focus();
return;
}
if (string.IsNullOrWhiteSpace(cbMaterial.Text))
{
infolabel.Text = "请选择标记类型!";
cbMaterial.Focus();
return;
}
if (string.IsNullOrEmpty(txtMainCode.Text))
{
infolabel.Text = "请扫描或填写装配码!";
signInfo.ProductCode = txtMainCode.Text;
signInfo.WorkLoc = _parentForm._SignMachineInfo.MACHINECODDE;
signInfo.Type = cbMaterial.Text;
txtMainCode.Focus();
return;
}
//*****************************
var _Product = _agent.InvokeServiceFunction<BZDRecorder2>(B9IPCService.BZDRecorderBLL_GetRecord.ToString(), new BZDRecorder2() { PRODUCTCODE = txtMainCode.Text });
var result = _agent.InvokeServiceFunction<DataResult<int>>(B9IPCService.SignInfoBLL_Insert.ToString(), signInfo);
if (_Product == null)
if (result.Result > 0)
{
string BZDRule = "";
DataTable dataTable = _agent.InvokeServiceFunction<DataTable>(B9IPCService.BZDConfigBLL_GetAppConfigValue.ToString(), "BZDRule");
if (dataTable.Rows.Count > 0)
{
BZDRule = dataTable.Rows[0]["Value"].ToString();
}
if (string.IsNullOrEmpty(BZDRule))
{
MessageBox.Show("未配置总成规则!");
return;
}
string MATERIAL_CODE = cbMaterial.Text.Split('|')[0];
if (System.Text.RegularExpressions.Regex.IsMatch(txtMainCode.Text, BZDRule))
{
//添加补打记录
_agent.InvokeServiceFunction<int>(B9IPCService.BarCodeReplacementBLL_Insert.ToString(), new BarCodeReplacement() { ProductCode = txtMainCode.Text, Type = "BZD条码补打" });
_parentForm.planMATERIAL_CODE = MATERIAL_CODE;
_parentForm.processMainCode = txtMainCode.Text;
//_parentForm.cBoxVAN = false;
//添加T_AW_PRODUCT
var ProductList = SelectProduct(txtMainCode.Text);
var PID = Guid.NewGuid().ToString();
var ProductNew = new Product()
{
PRODUCTCODE = txtMainCode.Text,
PID = PID,
//MACHINECODDE = _operationServiceParam.machineInfo.MACHINECODDE,
//MACHINENAME = _operationServiceParam.machineInfo.MACHINENAME,
PRODUCTSOURCE = "0",
MATERIAL_CODE = MATERIAL_CODE,
STATUS = "0",
OUTFLAG = "0",
USINGSTATE = "0",
CAPACITY = 1,
USINGCOUNT = 0,
//WORKCELL_CODE = ProductList.WORKCELL_CODE,
//WORKLOC_CODE = ProductList.WORKLOC_CODE,
//WORKCENTER_CODE = ProductList.WORKCENTER_CODE,
WORKCENTER_CODE = "ASSLINE",
MATERIAL_TYPE = "IP_FINASSY"
};
//_agent.InvokeServiceFunction<DataResult<int>>(B9BasicService.ProductBLL_Insert.ToString(), ProductNew);
DataResult<int> result;//判断是否成功
//result = _agent.InvokeServiceFunction<DataResult<int>>(B9BasicService.ProductBLL_Insert.ToString(), ProductNew);
result = _agent.InvokeServiceFunction<DataResult<int>>(B9BasicService.ProductBLL_InsertForBundle.ToString(), ProductNew);
if (!result.IsSuccess)
{
MessageBox.Show(result.Msg);
return;
}
_parentForm.Print052QRCODE(false,txtMainCode.Text);
}
else
{
MessageBox.Show("条码规则不符合!");
}
infolabel.Text = "保存成功!";
txtMainCode.Text = "";
return;
}
else
MessageBox.Show("条码已存在!");
}
catch (Exception exception)
{
@ -164,12 +100,9 @@ namespace QMAPP.WinForm.Forms.Operation
/// <param name="e"></param>
private void PrintForm_Load(object sender, EventArgs e)
{
_bzdConfig =
_agent.InvokeServiceFunction<List<BZDConfig>>(B9IPCService.BZDConfigBLL_GetAllList.ToString(),"");
foreach (var t in _bzdConfig)
{
t.MATERIALCODDE = t.MATERIALCODDE + "|" + t.ColorDetail;
}
_bzdConfig.Add(new Config { PID = "配胶", MATERIALCODDE = "配胶" });
_bzdConfig.Add(new Config { PID = "清胶", MATERIALCODDE = "清胶" });
_bzdConfig.Add(new Config { PID = "表皮新料", MATERIALCODDE = "表皮新料" });
LoadAssyMaterial();
}
@ -188,7 +121,19 @@ namespace QMAPP.WinForm.Forms.Operation
this.cbMaterial.DisplayMember = "MATERIALCODDE";
this.cbMaterial.ValueMember = "PID";
}
/// <summary>
///
/// </summary>
public class Config{
/// <summary>
///
/// </summary>
public string PID { get; set; }
/// <summary>
///
/// </summary>
public string MATERIALCODDE { get; set; }
}
#endregion

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

@ -186,9 +186,11 @@ namespace QMAPP.WinForm.Forms.TianJin
//bool b = g.PrintBarCode(_operationServiceParam.main.MAINCODE);
QM.Assist.LabelInfo ll = new QM.Assist.LabelInfo();
StringBuilder dataline=new StringBuilder();
var TMPPath = string.Empty;
var DATPath = string.Empty;
foreach (var label in labeldata)
{
string[] texts = new string[6];
string[] texts = new string[8];
var sourcetext = label.Description.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
@ -198,7 +200,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}\"\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}\"\r\n",
label.OrderNo,//计划号
label.OrderType,//计划类型(0:FIS,1:STOCK,2:INSERT)
label.PlanDate,//计划日期
@ -211,9 +213,20 @@ namespace QMAPP.WinForm.Forms.TianJin
texts[3],//装配详细信息
texts[4],//装配详细信息
texts[5],//装配详细信息
texts[6],//装配详细信息
texts[7],//装配详细信息
label.MATERIALCODE//
);
if (label.OrderNo.Contains("018D"))
{
TMPPath = "PlanLabelTMPPath8D";
DATPath = "PlanLabelDATPath8D";
}
else
{
TMPPath = "PlanLabelTMPPath";
DATPath = "PlanLabelDATPath";
}
}
@ -222,8 +235,8 @@ namespace QMAPP.WinForm.Forms.TianJin
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
(), System.Configuration.ConfigurationManager.AppSettings[TMPPath].ToString
(), System.Configuration.ConfigurationManager.AppSettings[DATPath].ToString
());
#endregion

6
AppCommon/QMAPP.ServicesAgent/ServiceEnums.cs

@ -4105,6 +4105,12 @@ namespace QMAPP.ServicesAgent
[Description("工控机方法枚举")]
public enum B9IPCService
{
#region
SignInfoBLL_Insert,
#endregion
#region 时间验证
CHECKTIMEBLL_Insert,

1
ServicesCenter/Task/QMTask.Host/App.config

@ -9,6 +9,7 @@
<add name="maindb" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/>
<add name="maindbYBB" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_QD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/>
<add name="maindbNCSYBB" connectionString="Data Source=USER-20180104HU;Initial Catalog=ADIENT_CD_MES;User Id=sa;Password=qm;" providerName="System.Data.SqlClient"/>
</connectionStrings>
<appSettings>
<!--任务调度服务凭据-->

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

@ -981,4 +981,11 @@
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
<ServiceDefinition>
<ServiceName>SignInfoBLL</ServiceName>
<ServiceDes>标记信息</ServiceDes>
<FullLogicClassName>QMAPP.FJC.BLL.Operation.SignInfoBLL</FullLogicClassName>
<AssemblyFile>QMAPP.FJC.BLL.dll</AssemblyFile>
</ServiceDefinition>
</BusinessDllList>
Loading…
Cancel
Save