using bizFacade;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Function1052.SaveCode
{
    public class SaveCode_J07MA080
    {
        public static Boolean SaveCode(String OpName) 
        {

            bool result = false;
            try
            {
                //北汽福田_TCU_增加
                //铭牌号 物料码  
                String nameplate;
                //总成码
                String EngineID;
                //机型代码
                String EngineTypeID;


                //获取物料码
                nameplate = DtWebApi.ReadWritePLC.ReadPLC("40", OpName).ToString();
                //变速器总成码
                EngineID = DtWebApi.ReadWritePLC.ReadPLC("10", OpName).ToString();
                EngineTypeID = DtWebApi.ReadWritePLC.ReadPLC("11", OpName).ToString();

                BaseDataSystemMES.TCU_Add(OpName, nameplate, EngineID, EngineTypeID);
                result = true;

            }
            catch (Exception err)
            {

            }
            
            return result;
        }
    }
}
