天津投入产出系统后端
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.
 
 
 
 
 
 

26 lines
927 B

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace QMAPP.FJC.TRACING.DataAnalyzers
{
public class MaterialCodeAnalyzer : DAInterface.IDataAnalyzer
{
public void Analyze(DAInterface.DAObject data)
{
DAL.MD.MaterialDAL dal = new DAL.MD.MaterialDAL();
var material = dal.Get(data.DAValue.ToString());
if (material == null)
{
throw new Exception("无法查到与此条码相关的物料信息!");
}
data.ObjectPID = "";//mould.PID;
data.AnalyzedValue = material.MATERIAL_CODE;
data.MaterialCode = material.MATERIAL_CODE;
//DAL.MD.MaterialDAL mdal = new DAL.MD.MaterialDAL();
//var material = mdal.Get(data.MaterialCode);
data.MaterialName = material == null ? "" : material.MATERIAL_SHORT;
}
}
}