You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
73 lines
2.6 KiB
73 lines
2.6 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMAPP.FJC.Entity.Basic;
|
|
using QMAPP.FJC.DAL.Basic;
|
|
using QMAPP.FJC.Entity;
|
|
using QMFrameWork.Log;
|
|
|
|
namespace QMAPP.FJC.BLL.Process
|
|
{
|
|
/// <summary>
|
|
/// 根据工控机校验获取对应的向生产设备发送的指令
|
|
/// 所有的逻辑在逻辑层中
|
|
///
|
|
/// </summary>
|
|
public class ProcessOrderSend
|
|
{
|
|
public List<ParameterConfig> Get(MachineInfo machine,bool validValue)
|
|
{
|
|
List<ParameterConfig> resultList = new List<ParameterConfig>();
|
|
ParameterConfigDAL paraConDal = new ParameterConfigDAL();
|
|
List<ParameterConfig> paraList = paraConDal.GetList(new ParameterConfig() { MACHINECODDE = machine.MACHINECODDE, COLUMNTYPE = EnumGeter.COLUMNTYPE.OPERATEFLAG.GetHashCode().ToString() });
|
|
|
|
switch (machine.PROCESSTYPE)
|
|
{
|
|
case "9":
|
|
//浇注对象
|
|
|
|
ParameterConfig casePara = paraList.First(o => o.COLUMNCODE.Contains(machine.MOLDNUMBER.ToString()));
|
|
casePara.PARAVALUE = validValue;
|
|
resultList.Add(casePara);
|
|
break;
|
|
|
|
case "14":
|
|
//超声波焊接
|
|
paraList = paraList.Where(o => o.MOLDNUMBER == machine.MOLDNUMBER).ToList<ParameterConfig>();
|
|
|
|
ParameterConfig ultraSpaPara = paraList.First(o => o.COLUMNCODE == "TRACEINCHECK");
|
|
ultraSpaPara.PARAVALUE = validValue;
|
|
resultList.Add(ultraSpaPara);
|
|
break;
|
|
|
|
default:
|
|
//12铣削
|
|
//6冷刀
|
|
//15红外焊接
|
|
//11冲切
|
|
paraList = paraList.Where(o => o.MOLDNUMBER == machine.MOLDNUMBER).ToList<ParameterConfig>();
|
|
ParameterConfig okPara = paraList.First(o => o.COLUMNCODE == "BARCODEOK");
|
|
ParameterConfig nokPara = paraList.First(o => o.COLUMNCODE == "BARCODENOK");
|
|
|
|
if (validValue)
|
|
{
|
|
okPara.PARAVALUE = validValue;
|
|
nokPara.PARAVALUE = !validValue;
|
|
}
|
|
else
|
|
{
|
|
okPara.PARAVALUE = validValue;
|
|
nokPara.PARAVALUE = !validValue;
|
|
}
|
|
|
|
resultList.Add(okPara);
|
|
resultList.Add(nokPara);
|
|
|
|
break;
|
|
}
|
|
|
|
return resultList;
|
|
}
|
|
}
|
|
}
|
|
|