yi eason hace 3 años
padre
commit
6018879985
Se han modificado 2 ficheros con 0 adiciones y 2999 borrados
  1. BIN
      Common.zip
  2. 0 2999
      frmOneYardToEnd.cs

BIN
Common.zip


+ 0 - 2999
frmOneYardToEnd.cs

@@ -1,2999 +0,0 @@
-using CarMeterSystem.OptionCls;
-using com.hnshituo.core.webapp.vo;
-using Common;
-using MeterConditionLibrary;
-using MeterPlugInLibrary;
-using MeterSceneLibrary;
-using MeterSceneLibrary.JISCO;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Configuration;
-using System.Data;
-using System.Drawing;
-using System.IO;
-using System.Linq;
-using System.Threading;
-using System.Windows.Forms;
-
-namespace CarMeterSystem
-{
-    public partial class frmOneYardToEnd : Form
-    {
-        public frmOneYardToEnd()
-        {
-            InitializeComponent();
-        }
-        private MeterWorkCarActualFirst firstDb = null;//一次计量数据
-        private SceneControl inner = new SceneControl(); //非内倒业务处理
-        private Print printClass = new Print();//打印
-        private VoicePlay vicPlayClass = new VoicePlay();//语音播放
-        private Log lg = Log.GetInstance(); //写日志
-
-        private MeterBaseCarService carService = new MeterBaseCarService(); //复磅操作
-        private MeterWorkCarRecoverService carRecoverService = new MeterWorkCarRecoverService(); //复磅操作
-        private MeterBaseTermTareDataService termTareDate = new MeterBaseTermTareDataService();//留期限皮操作
-        private MeterWorkMonitorService monitor = new MeterWorkMonitorService(); //设备及远程呼叫监控表
-        private MeterWorkCarActualFirstService workCarActualFirstService = new MeterWorkCarActualFirstService(); //一次计量数据
-        private PreTrackScaleService trackService = new PreTrackScaleService();//查询预报信息
-        private MeterBaseMatterInfoService matterInfoService = new MeterBaseMatterInfoService(); //物料信息
-        private PreTrackScaleService PreTrackScaleService = new PreTrackScaleService();
-        private MeterWorkScheduledHelpService meterWorkScheduledHelpService = new MeterWorkScheduledHelpService();
-        private MeterWorkCompareSpotScaleService meterWorkCompareSpotScaleService = new MeterWorkCompareSpotScaleService();
-        private MeterBaseSpecialUnitService meterBaseSpecialUnitService = new MeterBaseSpecialUnitService();
-        private MyTest myTest = new MyTest();
-
-
-        private validTermTareCar termTareCar = new validTermTareCar();//验证是否可留期限皮
-        private validRecoverInfo recoverInfo = new validRecoverInfo();//验证是否需要复磅以及是否满足复磅条件
-        private validArea areaInfo = new validArea();//验证区域是否正确
-        private validPrediction validPred = new validPrediction(); //验证预报信息
-        private validUnloadAutomatic unloadAutomatic = new validUnloadAutomatic(); //自动卸货
-        private validDataValidity dataValidity = new validDataValidity(); //验证采集的重量是否正常
-        private validMatterName validMatterName = new validMatterName(); //物资名称验证与类型类型的关系验证
-        private validDoorPost validDoorPost = new validDoorPost(); //验证门岗进厂的数据:返回空则说明已有进厂记录,允许计量
-        private validUnitName validUnitName = new validUnitName();//九钢收发货名称的验证 
-        private JGLimsInterface limsInterface = new JGLimsInterface(); //九钢检化验提示处理
-        private validShipWeight vShipWeight = new validShipWeight(); //本次的提单量+历史已经运输的总量,若大于提单总量,则不允许继续计量了
-        private double firstWgt = 0;
-        private bool bRailwayActual = true;
-        private bool isVoiceDownCar = false;//车上人员请下车播放一次
-        private string firstCode = "";//上次扫码编号
-        private string TrackCarNo = "";//预报车号
-        private string sPreCarNo = "";//摄像头识别车号
-        private string limsMsg = "";
-        private double wgt = 0;
-        private string temporaryResult = "";
-        private string temporaryCarNo = "";
-        private SaveMethod saveMethod = new SaveMethod();
-
-        private validTimeInterval vti = new validTimeInterval();
-
-        private LED_Control led_controler;
-
-        private MeterWorkCarActualFirst meterWorkCarActualFirst = null;
-
-        private ImageCurlControl imageCurlControl = new ImageCurlControl();
-
-        // 抓图用的界面 20220808 by BourneCao
-        private frmVoice frmVoice = new frmVoice();
-
-        //lianDaWgt
-
-        //=========== 2021-11-25 eason add ====================
-        LianDaMeter lianda = new LianDaMeter();
-        int lianDaWgt = Convert.ToInt32(ConfigurationManager.AppSettings["lianDaWgt"]?.ToString() ?? "0");
-        string lianDaPointNo = ConfigurationManager.AppSettings["lianDaPointNo"]?.ToString() ?? "00019";
-        /// <summary>
-        /// 是否是联达物料 0否1是
-        /// </summary>
-        PbModelDb lianDaQuery = null;
-        //=====================================================
-
-        private void frmOneYardToEnd_Load(object sender, EventArgs e)
-        {
-            try
-            {
-                lg.WriteLog(31, "frmOneYardToEnd_Load页面打开(Load:frmOneYardToEnd_Load),车号:" + PbCache.resultCarNo + "||" + (PbCache.collect == null ? "" : PbCache.collect.carno));
-                wgt = 0;
-                temporaryResult = "";
-                temporaryCarNo = "";
-                NewMessageArrived += new HandleMessageDelegate(OnMessageArrived);//rxh add
-                if (!string.IsNullOrEmpty(PbCache.sportInfo.ledIp) && PbCache.monitor.isTakeOver != "1" && PbCache.monitor.isTakeOver != "2")
-                {
-                    led_controler = new LED_Control(PbCache.sportInfo.ledIp);
-                }
-                meterWorkCarActualFirst = new MeterWorkCarActualFirst();
-                PbCache.mwPreFirst = meterWorkCarActualFirst;
-                PbCache.isPre = false;
-
-                //不显示重量
-                ucWeightCarTJXJG1.setWgtBackColor(true);
-                if (PbCache.isTest)
-                {
-                    btnFH.Enabled = true;
-                    btnFH.Visible = true;
-                }
-                btnTare.Visible = false;
-                //timer1.Start();//rxh delete
-                //StartRefreshData(0);//rxh add
-                lbPointName.Text = PbCache.sportInfo.baseSpotName;
-                ucCarMeterInfoJisco1.setMeterType(PbCache.bussinessTypeName);
-                tableLayoutPanelPromptMsg.CellBorderStyle = (TableLayoutPanelCellBorderStyle)BorderStyle.FixedSingle;
-
-                // 初始化截图界面
-                frmVoice.LoadVoiceInfo();
-                frmVoice.Show();
-                frmVoice.Hide();
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(13, PbCache.lockCarNo + "frmCarSalePurchase_Load事件异常:" + ex.Message);
-            }
-        }
-
-        public void init()
-        {
-            isMeasureSuccess = false;
-
-            PbCache.mwPreFirst = meterWorkCarActualFirst;
-
-            PbCache.isPre = false;
-
-            //不显示重量
-            ucWeightCarTJXJG1.setWgtBackColor(true);
-            if (PbCache.isTest)
-            {
-                btnFH.Enabled = true;
-                btnFH.Visible = true;
-            }
-            btnTare.Visible = false;
-
-            btnSave.Enabled = true;
-            //timer1.Start();//rxh detele
-            StartRefreshData(0);//rxh add
-            lbPointName.Text = PbCache.sportInfo.baseSpotName;
-            ucCarMeterInfoJisco1.setMeterType(PbCache.bussinessTypeName);
-            tableLayoutPanelPromptMsg.CellBorderStyle = (TableLayoutPanelCellBorderStyle)BorderStyle.FixedSingle;
-        }
-
-        /// <summary>
-        /// 数据保存
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnSave_Click(object sender, EventArgs e)
-        {
-            try
-            {
-                bool isCompare = false;
-
-                RESTfulResult<List<MeterWorkCompareSpotSacle>> reSacle = meterWorkCompareSpotScaleService.doQuery(new MeterWorkCompareSpotSacle { carNo = PbCache.collect.carno, valueFlag = "1" });
-                if (reSacle.Succeed)
-                {
-                    if (reSacle.Data == null || reSacle.Data.Count == 0)
-                    { }
-                    else
-                    {
-                        isCompare = true;
-                    }
-                }
-
-                if (PbCache.collect != null && PbCache.collect.weightStatus != 0)
-                {
-                    return;
-                }
-
-                if (PbCache.collect == null) return;
-
-                PbCache.lockCarNo = PbCache.collect.carno;
-
-                lg.WriteLog(15, PbCache.lockCarNo + "点击保存按钮");
-                PreTrackScale preTrack = ucCarMeterInfoJisco1._preTrack;
-                string strMsg = "";
-
-
-                #region 间隔时间太短
-                vti.ValidMethod(new PreTrackScale(), "2", null);
-                if (!PbCache.monitorResult.valid_time_interval)
-                {
-                    //间隔时间太短
-                    vicPlayClass.GetVoicePlay("计量间隔时间太短", PbCache.collect.carno);
-                    PbCache.ResultMessage = "计量间隔时间太短";
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "计量间隔时间太短");
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-                #endregion
-
-                #region 红外对射及量程验证
-                valid.ValidMethod();
-                if (PbCache.range != null && PbCache.range.upperRange < PbCache.collect.weight)
-                {
-                    //超量程
-                    vicPlayClass.GetVoicePlay("已超量程", PbCache.collect.carno);
-                    PbCache.ResultMessage = "当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!";
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!");
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-                else if (PbCache.collect.weightStatus == 0 && !PbCache.monitorResult.valid_park_status)
-                {
-                    //重量稳定,且对射验证不合格
-                    vicPlayClass.GetVoicePlay("车辆超出秤台,请调整车位", PbCache.collect.carno);
-                    PbCache.ResultMessage = "车辆超出秤台,请调整车位"; //btnSave_Click
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车辆超出秤台,请调整车位");
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-                #endregion 红外对射及量程验证
-
-                //仪表重量验证
-                if (!dataValidity.ValidMethod(PbCache.lockWgt))
-                {
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-
-                //物资名称验证与类型类型的关系验证;业务类型验证
-                if (!validMatterName.ValidMethod(preTrack))
-                {
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-
-                //九钢收发货名称与计量点区域的验证 
-                if (!validUnitName.ValidMethod(preTrack))
-                {
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-
-                //判断区域是否正确
-                if (!areaInfo.ValidMethod(PbCache.sportInfo, txtCarNo.Text) && PbCache.monitor.validArea == "1" && !isCompare)
-                {
-                    vicPlayClass.GetVoicePlay("计量失败,异地洁净,请联系计量大厅", PbCache.collect.carno);
-                    PbCache.ResultMessage = "计量失败:异地结净,请联系计量大厅"; //btnSave_Click
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "计量失败:异地结净,请联系计量大厅");
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg("计量失败:异地结净,请联系计量大厅");
-                    return;
-                }
-
-                //2021年6月22日 存在需要复磅的数据,不允许进行保存操作
-                recoverInfo.ValidAllowSave(PbCache.lockCarNo);
-                if (PbCache.isAllowRecover)
-                {
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-
-                //存在零点禁止计量
-                if (PbCache.isZeroAlarm)
-                {
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg("仪表未归零,无法计量,请联系大厅");
-                    vicPlayClass.GetVoicePlay("仪表未归零,无法计量,请联系大厅", PbCache.collect.carno);
-                    PbCache.ResultMessage = "仪表未归零,无法计量,请联系大厅"; //btnSave_Click
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "仪表未归零,无法计量,请联系大厅");
-                    return;
-                }
-
-                if (string.IsNullOrEmpty(PbCache.lockCarNo))
-                {
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg("车号未识别,请联系处理" + "");
-                    vicPlayClass.GetVoicePlay("车号未识别,请联系处理", PbCache.lockCarNo);
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车号未识别,请联系处理");
-                    return;
-                }
-
-                RESTfulResult<List<MeterBaseCar>> resCarList1 = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.lockCarNo, validFlag = "0" });
-                if (!resCarList1.Succeed || resCarList1.Data == null || resCarList1.Data.Count != 1)
-                {
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    setMsg("车号未注册,请联系处理" + "");
-                    vicPlayClass.GetVoicePlay("车号未注册,请联系处理", PbCache.lockCarNo);
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车号未注册,请联系处理");
-                    lg.WriteLog(29, "车号未注册,请联系处理,车号:" + PbCache.lockCarNo + ",数量:" + ((resCarList1.Succeed && resCarList1.Data != null) ? resCarList1.Data.Count + "" : "失败"));
-                    return;
-                }
-                //本次的提单量+历史已经运输的总量,若大于提单总量,则不允许继续计量了
-                //BourneCao暂时屏蔽
-                //if (!vShipWeight.ValidMethod(preTrack))
-                //{
-                //    PbCache.isLockFrm = false;
-                //    btnSave.Enabled = true;
-                //    setMsg(PbCache.ResultMessage);
-                //    return;
-                //}
-
-                //txtMsgInfo.Text = "称重保存中......";
-                setMsg("称重保存中......");
-                //FrmMessage frmMessage = FrmMess("是否确认保存当前计量数据!", "继续保存");
-
-
-                try
-                {
-                    //是否在黑名单内
-                    MeterBaseCarBlacelistService bService = new MeterBaseCarBlacelistService();
-                    RESTfulResult<List<MeterBaseCarBlacelist>> rmB = bService.doQueryWf(new MeterBaseCarBlacelist { carNo = PbCache.lockCarNo, valueFlag = "1" });
-                    if (rmB.Succeed)
-                    {
-                        if (rmB.Data != null && rmB.Data.Count > 0)
-                        {
-                            PbCache.voiceType = 22;
-                            readVoicd();
-                            PbCache.ResultMessage = string.Format("车辆[{0}在黑名单内,不能计量", PbCache.lockCarNo);
-                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, string.Format("车辆[{0}在黑名单内,不能计量", PbCache.lockCarNo));
-                            lg.WriteLog(3, string.Format("车辆[{0}在黑名单内,不能计量", PbCache.lockCarNo));
-
-                            PbCache.isLockFrm = false;
-                            btnSave.Enabled = true;
-                            setMsg(PbCache.ResultMessage);
-                            return;
-                        }
-                    }
-                    else
-                    {
-                        PbCache.ResultMessage = "保存失败,获取黑名单数据异常,请稍后再试";
-                        lg.WriteLog(3, "获取黑名单数据异常,请稍后再试");
-
-                        PbCache.isLockFrm = false;
-                        btnSave.Enabled = true;
-                        setMsg(PbCache.ResultMessage);
-                        return;
-                    }
-
-                    //验证门岗进厂的数据:返回空则说明已有进厂记录,允许计量
-                    // BourneCao暂时注释
-                    //if (!validDoorPost.ValidMethod(preTrack))
-                    //{
-                    //    PbCache.isLockFrm = false;
-                    //    btnSave.Enabled = true;
-                    //    setMsg(PbCache.ResultMessage);
-                    //    return;
-                    //}
-
-                    // BourneCao暂时注释
-                    // 附加重量
-                    //PbCache.addWgt = preTrack.addWeightSum == null ? 0 : preTrack.addWeightSum.Value;
-                    bool flag = false;
-
-                    //说明:不管是成功还是失败,都在180行有提示信息
-                    //if (inner.WeightMeter(preTrack, null, out strMsg))  //meterTypeNo  "001006001","001006002"
-                    //{
-                    //    flag = true;
-                    //    ucWeightCarTJXJG1.setWgtBackColor(true);//称重完成后,显示颜色;
-
-                    //    //票据打印
-                    //    //Print1(PbCache.actualFirstNo);  
-
-                    //    //九钢检化验处理
-                    //    limsInterface.imsCarLims(preTrack);
-
-
-                    //    //若不是测试,保存完成后则不能返回,若是测试界面进入的则可点击返回按钮
-                    //    if (PbCache.isTest)
-                    //    {
-                    //        btnFH.Enabled = true;
-                    //        btnFH.Visible = true;
-                    //    }
-                    //}
-                    //else
-                    //{
-                    //    PbCache.isLockFrm = false;
-                    //    btnSave.Enabled = true;
-                    //}
-
-                    /* 
-                     * 锁界面,修改图标,锁定重量,拍照,截图
-                     * 用户反馈拍照重量,截图重量与实际保存重量不一致,因此修改
-                     * by BourneCao 20220801 
-                     */
-                    ucWeightCarTJXJG1.setStable(true);    // 重量稳定
-                    ucWeightCarTJXJG1.setWgt(Math.Round((double)PbCache.collect.weight / 1000, 2));    // 最新重量
-
-                    PbCache.isLockFrm = true;   // 锁界面,不可修改重量
-                    PbCache.lockWgt = PbCache.collect.weight;
-                    btnSave.Enabled = false;
-
-                    lg.WriteLog(34, "车号:" + PbCache.lockCarNo + ";重量:" + PbCache.lockWgt + ";时间:" + DateTime.Now.ToLongTimeString());
-
-                    // 启动拍照
-                    PbCache.tempImgId = Guid.NewGuid().ToString();
-                    lg.WriteLog(35, "启动拍照    车号:" + PbCache.lockCarNo + ";重量:" + PbCache.lockWgt + ";时间:" + DateTime.Now.ToLongTimeString());
-                    // 先截取重量仪表截图
-                    frmVoice.CapturePictrue(PbCache.tempImgId + "_temp");
-                    // 后截取其它摄像头截图
-                    _ = BeginInvoke(new Action(() => { shotImage(PbCache.tempImgId + "_temp"); }));
-
-
-
-                    isStop = true;
-                    #region 酒钢业务流程判断
-                    if (isCompare)
-                    {
-                        ExecuteMethod em = new ExecuteMethod();
-                        RESTfulResult<rtInfo> strRm = new RESTfulResult<rtInfo>();
-                        try
-                        {
-                            btnSave.Enabled = false;
-                            strRm = em.GetAndExecuteMethod<rtInfo>("MeterSceneLibrary", "compare", "MeterMethod", new object[] { new PreTrackScale { } });
-                            setMsg(strRm.ResultMessage);
-                            strMsg = strRm.ResultMessage;
-                            if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                            {
-                                led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                            }
-                            isStop = false;
-                        }
-                        catch (Exception exp)
-                        {
-                            PbCache.ResultMessage = "获取计量场景信息失败,请点击语音求助";
-                            //这里是未找到方法的情况
-                            lg.WriteLog(3, "获取场景失败!" + strRm.ResultMessage);
-                            setMsg(PbCache.ResultMessage);
-                            if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                            {
-                                led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                            }
-                            isStop = false;
-                            //break;
-                            return;
-                        }
-                        if (strRm.Succeed)
-                        {
-                            if (strRm.Data.isError)
-                            {
-                                //如果是报错则直接不执行,并写入信息到界面,同时调用语音播报
-                                readVoicd();
-                                PbCache.ResultMessage = strRm.Data.resultInfo;
-                                PbCache.monitorResultMessage = strRm.Data.resultInfo;
-                                PbCache.isLockFrm = false;
-                                btnSave.Enabled = true;
-                                setMsg(PbCache.ResultMessage);
-                                Monitor(strRm.Data);
-                                if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                {
-                                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                }
-                                isStop = false;
-                                return;
-                            }
-
-                            if (strRm.Data.result) //说明:标识当前跑了一个场景成功了;场景完成后则返回,不再进行下一个场景的执行操作;
-                            {
-                                PbCache.ResultMessage = strRm.Data.resultInfo;
-                                setMsg(PbCache.ResultMessage);
-                                Monitor(strRm.Data);
-                                if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                {
-                                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                }
-                                isStop = false;
-                                return;
-                            }
-                            else
-                            {
-                                //说明:不满足场景的的要求,不能进行return,继续下一个场景,若所有的场景都失败,则提示“未找到计量场景配置信息” 
-                                //ResultMessage = strRm.Data.resultInfo;
-                                //return strRm.Data.result;  //2021-3-18 杨秀东注释;要处理一车联运(多场景)的数据;问题:提示信息会出现问题
-                            }
-                        }
-                        else
-                        {
-                            readVoicd();
-                            PbCache.ResultMessage = strRm.ResultMessage;
-                            PbCache.isLockFrm = false;
-                            btnSave.Enabled = true;
-                            setMsg(PbCache.ResultMessage);
-
-                            // todo:更新监控表,此秤点求助状态为求助中
-                            if (PbCache.monitor.isHelp == "0")
-                            {
-                                RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo, isHelp = "1" });
-                                if (!rms.Succeed)
-                                {
-                                    lg.WriteLog(3, PbCache.lockCarNo + "求助写入失败");
-                                }
-                            }
-                            Monitor(strRm.Data);
-                            if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                            {
-                                led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                            }
-                            isStop = false;
-                            return;
-
-                        }
-                    }
-                    else
-                    {
-                        // 把车号加上-
-                        string tempCarNo = PbCache.lockCarNo;
-                        RESTfulResult<List<MeterBaseCar>> resCarList = carService.doQueryCarList(new MeterBaseCar { carNo = tempCarNo, validFlag = "0" });
-                        RESTfulResult<rtInfo> strRm = new RESTfulResult<rtInfo>();
-                        if (resCarList.Succeed)
-                        {
-                            if (resCarList.Data != null && resCarList.Data.Count == 1)
-                            {
-                                MeterBaseCar car = resCarList.Data[0];
-
-                                ExecuteMethod em = new ExecuteMethod();
-
-                                //判断是否为外发试验性称量,预防超载或欠载(不算正常计量)(吉瑞、铁合金车辆)
-
-                                // 厂内车辆
-                                if (car.carTypeNo == "001004003")
-                                {
-                                    try
-                                    {
-                                        btnSave.Enabled = false;
-                                        strRm = em.GetAndExecuteMethod<rtInfo>("MeterSceneLibrary", "InnerCarJISCO", "MeterMethod", new object[] { new PreTrackScale { } });
-                                        if (!string.IsNullOrEmpty(strRm.ResultMessage))
-                                        {
-                                            setMsg(strRm.ResultMessage);
-                                            strMsg = strRm.ResultMessage;
-                                            PbCache.ResultMessage = strRm.ResultMessage;
-                                        }
-                                        else
-                                        {
-                                            setMsg(strRm.Data.resultInfo);
-                                            strMsg = strRm.Data.resultInfo;
-                                            PbCache.ResultMessage = strRm.Data.resultInfo;
-                                        }
-                                        if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                        {
-                                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                        }
-                                        RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo, ferroalloyResult = "1" });
-                                        if (!rms.Succeed)
-                                        {
-                                            lg.WriteLog(3, PbCache.lockCarNo + "求助写入失败");
-                                        }
-                                        isStop = false;
-                                    }
-                                    catch (Exception exp)
-                                    {
-                                        PbCache.ResultMessage = "获取计量场景信息失败,请点击语音求助";
-                                        //这里是未找到方法的情况
-                                        lg.WriteLog(3, "获取场景失败!" + strRm.ResultMessage);
-                                        setMsg(PbCache.ResultMessage);
-                                        if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                        {
-                                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                        }
-                                        isStop = false;
-                                        //break;
-                                        return;
-                                    }
-                                }
-                                // 厂外车辆
-                                else if (car.carTypeNo == "001004002")
-                                {
-                                    try
-                                    {
-                                        btnSave.Enabled = false;
-                                        strRm = em.GetAndExecuteMethod<rtInfo>("MeterSceneLibrary", "OuterCarJISCO", "MeterMethod", new object[] { new PreTrackScale { } });
-                                        if (!string.IsNullOrEmpty(strRm.ResultMessage))
-                                        {
-                                            setMsg(strRm.ResultMessage);
-                                            strMsg = strRm.ResultMessage;
-                                            PbCache.ResultMessage = strRm.ResultMessage;
-                                        }
-                                        else
-                                        {
-                                            setMsg(strRm.Data.resultInfo);
-                                            strMsg = strRm.Data.resultInfo;
-                                            PbCache.ResultMessage = strRm.Data.resultInfo;
-                                        }
-                                        if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                        {
-                                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                        }
-                                        RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo, ferroalloyResult = "1" });
-                                        if (!rms.Succeed)
-                                        {
-                                            lg.WriteLog(3, PbCache.lockCarNo + "求助写入失败");
-                                        }
-                                        isStop = false;
-                                    }
-                                    catch (Exception exp)
-                                    {
-                                        PbCache.ResultMessage = "获取计量场景信息失败,请点击语音求助";
-                                        //这里是未找到方法的情况
-                                        lg.WriteLog(3, "获取场景失败!" + strRm.ResultMessage);
-                                        setMsg(PbCache.ResultMessage);
-                                        if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                        {
-                                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                        }
-                                        //break;
-                                        isStop = false;
-                                        return;
-                                    }
-                                }
-
-                                if (strRm.Succeed)
-                                {
-                                    if (strRm.Data.isError)
-                                    {
-                                        //如果是报错则直接不执行,并写入信息到界面,同时调用语音播报
-                                        readVoicd();
-                                        PbCache.ResultMessage = strRm.Data.resultInfo;
-                                        PbCache.monitorResultMessage = strRm.Data.resultInfo;
-                                        PbCache.isLockFrm = false;
-                                        btnSave.Enabled = true;
-                                        setMsg(PbCache.ResultMessage);
-                                        Monitor(strRm.Data);
-                                        if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                        {
-                                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                        }
-                                        isStop = false;
-                                        return;
-                                    }
-
-                                    if (strRm.Data.result) //说明:标识当前跑了一个场景成功了;场景完成后则返回,不再进行下一个场景的执行操作;
-                                    {
-                                        PbCache.ResultMessage = strRm.Data.resultInfo;
-                                        setMsg(PbCache.ResultMessage);
-                                        Monitor(strRm.Data);
-                                        if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                        {
-                                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                        }
-                                        isStop = false;
-                                        //return;
-                                    }
-                                    else
-                                    {
-                                        //说明:不满足场景的的要求,不能进行return,继续下一个场景,若所有的场景都失败,则提示“未找到计量场景配置信息” 
-                                        //ResultMessage = strRm.Data.resultInfo;
-                                        //return strRm.Data.result;  //2021-3-18 杨秀东注释;要处理一车联运(多场景)的数据;问题:提示信息会出现问题
-                                    }
-                                }
-                                else
-                                {
-                                    readVoicd();
-                                    PbCache.ResultMessage = strRm.ResultMessage;
-                                    PbCache.isLockFrm = false;
-                                    btnSave.Enabled = true;
-                                    setMsg(PbCache.ResultMessage);
-
-                                    // todo:更新监控表,此秤点求助状态为求助中
-                                    if (PbCache.monitor.isHelp == "0")
-                                    {
-                                        RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo, isHelp = "1" });
-                                        if (!rms.Succeed)
-                                        {
-                                            lg.WriteLog(3, PbCache.lockCarNo + "求助写入失败");
-                                        }
-                                    }
-                                    Monitor(strRm.Data);
-                                    if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                                    {
-                                        led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                                    }
-                                    isStop = false;
-                                    return;
-
-                                }
-                            }
-                            //else
-                            //{
-                            //ExecuteMethod em = new ExecuteMethod();
-                            //try
-                            //{
-                            //    btnSave.Enabled = false;
-                            //    strRm = em.GetAndExecuteMethod<rtInfo>("MeterSceneLibrary", "OuterCarJISCO", "MeterMethod", new object[] { new PreTrackScale { } });
-                            //    if (!string.IsNullOrEmpty(strRm.ResultMessage))
-                            //    {
-                            //        setMsg(strRm.ResultMessage);
-                            //        strMsg = strRm.ResultMessage;
-                            //        PbCache.ResultMessage = strRm.ResultMessage;
-                            //    }
-                            //    else
-                            //    {
-                            //        setMsg(strRm.Data.resultInfo);
-                            //        strMsg = strRm.Data.resultInfo;
-                            //        PbCache.ResultMessage = strRm.Data.resultInfo;
-                            //    }
-                            //    if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                            //    {
-                            //        led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                            //    }
-                            //    RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo, ferroalloyResult = "1" });
-                            //    if (!rms.Succeed)
-                            //    {
-                            //        lg.WriteLog(3, PbCache.lockCarNo + "求助写入失败");
-                            //    }
-                            //    isStop = false;
-                            //}
-                            //catch (Exception exp)
-                            //{
-                            //    PbCache.ResultMessage = "获取计量场景信息失败,请点击语音求助";
-                            //    //这里是未找到方法的情况
-                            //    lg.WriteLog(3, "获取场景失败!" + strRm.ResultMessage);
-                            //    setMsg(PbCache.ResultMessage);
-                            //    if (!string.IsNullOrEmpty(PbCache.LEDResultMessage))
-                            //    {
-                            //        led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                            //    }
-                            //    //break;
-                            //    isStop = false;
-                            //    return;
-                            //}
-                            //}
-                        }
-                    }
-                    #endregion
-                    isStop = false;
-                    #region 期限皮显示及保存
-
-                    ////留期限皮提醒
-                    //string sql = @"select base_spot_no   baseSpotNo,
-                    //                   base_spot_name baseSpotName,
-                    //                   warn_time      warnTime,
-                    //                   end_time    endTime,
-                    //                   car_no         carNo
-                    //              from Meter_Base_Term_Tare_Data
-                    //              where car_no='" + PbCache.lockCarNo + "' and value_flag='0' order by METER_TIME desc ";
-                    //PbModelDbService<List<MeterBaseTermTareData>> pbModelDbService = new PbModelDbService<List<MeterBaseTermTareData>>();
-                    //RESTfulResult<List<MeterBaseTermTareData>> rES = pbModelDbService.executeSqlDataWf(sql);
-
-                    //if (rES.Succeed)
-                    //{
-                    //    if (rES.Data != null && rES.Data.Count > 0)
-                    //    {
-                    //        if (DateTime.Now.CompareTo(rES.Data[0].endTime) >= 0)
-                    //        {
-                    //            PbCache.ResultMessage += "\n\r提醒:期限皮重已过期,请及时留期限皮";
-                    //        }
-                    //        else if (DateTime.Now.CompareTo(rES.Data[0].warnTime) >= 0)
-                    //        {
-                    //            PbCache.ResultMessage += "\n\r提醒:期限皮重将要过期,请及时留期限皮";
-                    //        }
-                    //    }
-                    //}
-
-                    isMeasureSuccess = true;
-
-                    /*
-                     * 图片上传,先截图,数据保存成功后,再修改为正式文件名,并上传
-                     * 解决抓图重量与实际重量不一致问题
-                     * By BourneCao 20220801
-                     */
-                    // 屏幕截取
-                    // 必须保存完成后才能截取屏幕图片,否则提示信息不对
-                    _ = BeginInvoke(new Action(() => { shotImageScreen(); }));
-
-                    string sPath = AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "imgShort\\";
-
-                    //获取正式目录文件中,本次tempID相关图片
-                    ArrayList files = imageCurlControl.GetFiles(sPath + "formalImg", ".jpg");
-                    foreach (string filename in files)
-                    {
-                        // 将原图片重命名为正式图片名称
-                        if (File.Exists(filename) && filename.Contains(PbCache.tempImgId))
-                        {
-                            File.Move(filename, filename.Replace(PbCache.tempImgId + "_temp", PbCache.actualFirstNo));
-                        }
-                    }
-
-                    //语音提醒部分
-                    //flag =true表示称重成功
-                    readVoicd();
-                    lg.WriteLog(35, "语音提示    成功标识:" + PbCache.shotSuccess.ToString() + "车号:" + PbCache.lockCarNo + ";重量:" + PbCache.lockWgt + ";时间:" + DateTime.Now.ToLongTimeString());
-
-                    wgt = PbCache.lockWgt;
-                    temporaryResult = PbCache.ResultMessage;
-                    temporaryCarNo = PbCache.collect.carno;
-
-
-                    //提示信息,
-                    //txtMsgInfo.Text = PbCache.ResultMessage;
-                    lblog = string.IsNullOrEmpty(PbCache.ResultMessage) ? strMsg : PbCache.ResultMessage;//偶尔出现ResultMessage为空的情况
-                    PbCache.ResultMessage = lblog;
-                    //queryWeightinfo(preTrack.predictionNo);
-                    DoShowlbLog(PbCache.ResultMessage);
-
-                    //期限皮按钮显示
-                    if (flag && !btnTare.Visible)
-                    {
-                        try
-                        {
-                            //2021年3月15日 杨秀东 期限皮重显示按钮的显示方法修改 isShowBtnTare   ValidMethod
-                            if (!string.IsNullOrEmpty(TrackCarNo) && termTareCar.isShowBtnTare(TrackCarNo))
-                            {
-                                btnTare.Visible = true;
-                            }
-                        }
-                        catch (Exception ex)
-                        {
-                            lg.WriteLog(13, PbCache.lockCarNo + "期限皮重按钮显示事件异常:" + ex.Message);
-                        }
-                    }
-                    //
-                    #endregion 期限皮显示及保存
-
-                    #region 求助写入
-
-                    if (PbCache.monitorResultMessage != "")
-                    {
-                        MeterWorkScheduledHelp meterWorkScheduledHelp = new MeterWorkScheduledHelp();
-                        meterWorkScheduledHelp.baseSpotNo = PbCache.sportInfo.baseSpotNo;
-                        meterWorkScheduledHelp.baseSpotName = PbCache.sportInfo.baseSpotName;
-                        meterWorkScheduledHelp.carNo = PbCache.collect.carno;
-                        meterWorkScheduledHelp.helpContent = PbCache.monitorResultMessage;
-                        meterWorkScheduledHelp.warmType = "2";
-                        meterWorkScheduledHelp.warmTypeName = "智能终端报警";
-                        meterWorkScheduledHelpService.add(meterWorkScheduledHelp);
-                    }
-
-                    #endregion
-
-                    #region LED写入
-                    //PbCache.ledInfo = string.Format("计量完成,车号:{0},车重:{1},物资:{2}", PbCache.lockCarNo, PbCache.lockWgt, preTrack != null ? preTrack.matterName : "");
-                    #endregion LED写入
-
-                    #region 智能料场LED显示
-                    saveMethod.sendToZnlc();
-                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, PbCache.LEDResultMessage);
-                    #endregion
-
-                    //计量完成后,显示毛重或者皮重
-
-
-                    _ = BeginInvoke(new Action(() =>
-                    {
-                        if (!PbCache.isActual && !PbCache.isInnerCar)
-                        {
-                            if (PbCache.isTareWeight)
-                                ucWeightCarTJXJG1.setWeightType("皮重");
-                            else
-                                ucWeightCarTJXJG1.setWeightType("毛重");
-                        }
-
-                    }));
-                }
-                catch (Exception ex)
-                {
-                    //语音播报
-                    vicPlayClass.GetVoicePlay("称重数据保存失败", PbCache.lockCarNo);
-                    //提示信息,
-                    //txtMsgInfo.Text = "称重数据保存失败";
-                    lblog = "称重数据保存失败!" + ex.Message;
-                    DoShowlbLog(lblog);
-                    lg.WriteLog(3, PbCache.lockCarNo + "称重保存失败:" + ex.Message);
-                    PbCache.isLockFrm = false;
-                    btnSave.Enabled = true;
-                    isStop = false;
-                }
-            }
-            catch (Exception ex)
-            {
-                //语音播报
-                //vicPlayClass.GetVoicePlay("称重数据保存失败", PbCache.lockCarNo);
-                //提示信息,
-                //txtMsgInfo.Text = "称重数据保存失败";
-                lblog = "称重数据保存失败!" + ex.Message;
-                DoShowlbLog(lblog);
-                lg.WriteLog(3, PbCache.lockCarNo + "称重保存失败:" + ex.Message);
-                PbCache.isLockFrm = false;
-                btnSave.Enabled = true;
-                isStop = false;
-            }
-        }
-
-        /// <summary>
-        ///  查询重量信息,显示在界面上面
-        /// </summary>
-        /// <param name="strPredition"></param>
-        public void queryWeightinfo(string strPredition)
-        {
-            try
-            {
-                string sqls = @"select '毛重:' || t.gross_weight / 1000 || ' T / 皮重:' || t.tare_weight / 1000 || ' T / 净重:' || t.net_weight / 1000 || ' T ' as txt as txt  
-                    from meter_work_car_actual t where t.value_flag = '0' and T.Prediction_No = '" + strPredition + @"'";
-
-                PbModelDbService<string> pbp = new PbModelDbService<string>();
-                RESTfulResult<string> rmT = pbp.executeSqlDataWf(sqls);
-                if (rmT.Succeed && rmT.Data != null && rmT.Data.Length > 10)
-                {
-
-                }
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(3, PbCache.lockCarNo + "计量完成,但重量信息提示失败:" + PbCache.actualFirstNo + ex.Message); ;
-            }
-        }
-        /// <summary>
-        /// 图片名称修改
-        /// </summary>
-        //public void updateImage()
-        //{
-        //    //string.Format("{0}imgShort\\formalImg\\{1}_{2}_{3}.jpg",AppDomain.CurrentDomain.SetupInformation.ApplicationBase,PbCache.sportInfo.baseSpotNo, "C" + PbCache.actualFirstNo, 7)
-        //    File.Move();
-        //}
-
-        /// <summary>
-        /// 终端截图
-        /// </summary>
-        public void shotImage()
-        {
-            try
-            {
-                #region 截取图片信息
-
-                //截取屏幕信息
-
-                Point screenPoint = this.PointToScreen(new Point());
-                Rectangle rect = new Rectangle(screenPoint, this.Size);
-                Image img = new Bitmap(rect.Width, rect.Height);
-                Graphics g = Graphics.FromImage(img);
-                g.CopyFromScreen(rect.X - 1, rect.Y - 1, 0, 0, rect.Size);//"D://file/1.jpg"
-                img.Save(string.Format("{0}imgShort\\formalImg\\{1}_{2}_{3}.jpg",
-                    AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
-                    PbCache.sportInfo.baseSpotNo, "C" + PbCache.actualFirstNo, 7), System.Drawing.Imaging.ImageFormat.Jpeg);
-                //*
-                //最后进行截图操作
-                CameraShotCls cameraShot = new CameraShotCls();
-                cameraShot.CapMethod(PbCache.actualFirstNo);
-                //*/
-
-                #endregion 截取图片信息
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(3, "计量完成,但图片截取失败,编号:" + PbCache.actualFirstNo);
-            }
-        }
-
-        /// <summary>
-        /// 摄像头截图(临时截图,使用临时ID存储)
-        /// </summary>
-        public void shotImage(string tempID)
-        {
-            try
-            {
-                #region 截取摄像头信息
-                //*
-                //最后进行截图操作
-                CameraShotCls cameraShot = new CameraShotCls();
-                cameraShot.CapMethod(tempID);
-
-                lg.WriteLog(35, "完成全部拍照    成功标识:" + PbCache.shotSuccess.ToString() + "车号:" + PbCache.lockCarNo + ";重量:" + PbCache.lockWgt + ";时间:" + DateTime.Now.ToLongTimeString());
-
-                //*/
-
-                #endregion 截取图片信息
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(3, "计量完成,但图片截取失败,编号:" + tempID);
-            }
-        }
-
-        /// <summary>
-        /// 终端截图(临时截图,使用临时ID存储)
-        /// </summary>
-        public void shotImageScreen()
-        {
-            try
-            {
-                #region 截取图片信息
-
-                //截取屏幕信息
-
-                Point screenPoint = this.PointToScreen(new Point());
-                Rectangle rect = new Rectangle(screenPoint, this.Size);
-                Image img = new Bitmap(rect.Width, rect.Height);
-                Graphics g = Graphics.FromImage(img);
-                g.CopyFromScreen(rect.X - 1, rect.Y - 1, 0, 0, rect.Size);//"D://file/1.jpg"
-                img.Save(string.Format("{0}imgShort\\formalImg\\{1}_{2}_{3}.jpg",
-                    AppDomain.CurrentDomain.SetupInformation.ApplicationBase,
-                    PbCache.sportInfo.baseSpotNo, "C" + PbCache.actualFirstNo, 7), System.Drawing.Imaging.ImageFormat.Jpeg);
-
-                lg.WriteLog(35, "完成截图    成功标识:" + PbCache.shotSuccess.ToString() + "车号:" + PbCache.lockCarNo + ";重量:" + PbCache.lockWgt + ";时间:" + DateTime.Now.ToLongTimeString());
-                #endregion 截取图片信息
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(3, "计量完成,但图片截取失败,编号:" + PbCache.actualFirstNo);
-            }
-        }
-
-        private void btnHelp_Click(object sender, EventArgs e)
-        {
-            if (PbCache.monitor.isHelp == "0")
-            {
-                RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo, isHelp = "1" });
-                if (!rms.Succeed)
-                {
-                    lg.WriteLog(3, PbCache.lockCarNo + "求助写入失败");
-                }
-            }
-            lg.WriteLog(15, PbCache.lockCarNo + "点击了语音求助按钮");
-        }
-
-        private bool isOverSound = false;
-
-        private bool isCalibration = true;
-        private bool bRelation = true;
-        private bool isShowRecover = true; //是否需要判断显示复磅按钮
-
-        //验证校秤数据
-        private validCalibration vCalib = new validCalibration();
-
-        //验证对射
-        private validParkStatus valid = new validParkStatus();
-        //是否已经播放不验证对射语音
-        bool isPlayCalibVoice = false;
-
-        //是否已经播放停留超时语音
-        bool isPlayOvertimeVoice = false;
-
-        //是否已经播放超量程语音
-        bool isPlayRangeVoice = false;
-
-        private validCarno vCarNo = new validCarno();
-
-        private bool bXCStart = false;
-
-        //停止定时器
-        private bool isStop = false;
-
-        //计量完成标识
-        private bool isMeasureSuccess = false;
-
-        private bool registerCar = false;
-
-        private bool isWriteLog = false;
-
-        //timer1_Tick实例化
-        MeterWorkScheduledHelp meterWorkScheduledHelpTimerPark = new MeterWorkScheduledHelp();
-        RESTfulResult<string> rmsMonitorcarErr1 = new RESTfulResult<string>();
-        RESTfulResult<string> rmsMonitorcarErr2 = new RESTfulResult<string>();
-        MeterWorkMonitor monitorcarErr1 = new MeterWorkMonitor();
-        MeterWorkMonitor monitorcarErr2 = new MeterWorkMonitor();
-        PreTrackScale preTrackScaleVCarNo = new PreTrackScale();
-        PbModelDbService<List<PbModelDb>> pbpAppTimer = new PbModelDbService<List<PbModelDb>>();
-        MeterWorkCalibrationMain meterWorkCalibrationMainTimer = new MeterWorkCalibrationMain();
-        MeterBaseCalibraNumRel calibraNumRelTimer = new MeterBaseCalibraNumRel();
-        RESTfulResult<List<MeterBaseCar>> resCarListTimer = new RESTfulResult<List<MeterBaseCar>>();
-        RESTfulResult<List<MeterBaseCar>> resCarListScaleTimer = new RESTfulResult<List<MeterBaseCar>>();
-        MeterBaseCar carScaleTimer = new MeterBaseCar();
-        RESTfulResult<List<PreTrackScale>> rmScaleListCarTimer = new RESTfulResult<List<PreTrackScale>>();
-        PreTrackScale preTrackScaleCarTimer = new PreTrackScale();
-        MeterWorkCarActualFirst actualFirstTimer = new MeterWorkCarActualFirst();
-        EntityBase<PreTrackScale> entityBaseTimer1 = new EntityBase<PreTrackScale>();
-        RESTfulResult<List<MeterWorkCarActualFirst>> RESTfulResultOutTimer = new RESTfulResult<List<MeterWorkCarActualFirst>>();
-        MeterWorkCarActualFirst outFirstTimer = new MeterWorkCarActualFirst();
-        RESTfulResult<MeterBaseCar> resResgiterCarTimer = new RESTfulResult<MeterBaseCar>();
-        MeterBaseCar resgiterCarTimer = new MeterBaseCar();
-        frmMatMsgInfo frmMatMsgInfo = new frmMatMsgInfo();
-        private void timer1_Tick(object sender, EventArgs e)
-        {
-            DualWeight();//rxh modify
-        }
-        private void DualWeight()
-        {
-            if (!isStop)
-            {
-                if (!isWriteLog)
-                {
-                    isWriteLog = true;
-                    lg.WriteLog(31, "frmOneYardToEnd_Load页面打开(timer1_Tick:frmOneYardToEnd_Load),车号:" + PbCache.resultCarNo + "||" + (PbCache.collect == null ? "" : PbCache.collect.carno));
-                }
-                try
-                {
-
-
-                    if (PbCache.collect.weight < 500)
-                    {
-                        PbCache.strState = "";
-                        //不显示重量
-                        ucWeightCarTJXJG1.setWgtBackColor(false);
-                        isCalibration = true;
-                        PbCache.addWgt = 0;
-                        InRuning = false;//rxh add
-                                         //this.Hide();//rxh detele
-                                         //hidWindow();//rxh detele
-                        return;
-                    }
-                    else
-                    {
-                        ucWeightCarTJXJG1.setWgtBackColor(true);
-                    }
-
-                    // 成功就只播语音,不再做任何处理
-                    if (isMeasureSuccess)
-                    {
-                        isStop = true;
-                        readVoicd();
-                        isStop = false;
-
-                        return;
-                    }
-
-                    if (PbCache.collect.parkStatus == 3)
-                    {
-                        meterWorkScheduledHelpTimerPark.baseSpotNo = PbCache.sportInfo.baseSpotNo;
-                        meterWorkScheduledHelpTimerPark.baseSpotName = PbCache.sportInfo.baseSpotName;
-                        meterWorkScheduledHelpTimerPark.carNo = PbCache.collect.carno;
-                        meterWorkScheduledHelpTimerPark.helpContent = "疑似跟车,请核查";
-                        meterWorkScheduledHelpTimerPark.warmType = "3";
-                        meterWorkScheduledHelpTimerPark.warmTypeName = "智能终端报警";
-                        meterWorkScheduledHelpService.add(meterWorkScheduledHelpTimerPark);
-                    }
-
-                    #region 0.接受远程修改过后的车号并显示
-                    //if (PbCache.monitor != null && !string.IsNullOrEmpty(PbCache.monitor.editCar))
-                    //{
-                    //    PbCache.lockCarNo = PbCache.monitor.editCar;
-                    //}
-                    #endregion
-
-                    #region 1、求助按钮控制
-                    if (PbCache.monitor != null && !string.IsNullOrEmpty(PbCache.monitor.isHelp))
-                    {
-                        switch (PbCache.monitor.isHelp)
-                        {
-                            case "0": //未呼叫
-                                {
-                                    if (btnHelp.Text != "语音求助")
-                                    {
-                                        btnHelp.BackColor = Color.DodgerBlue;
-                                        btnHelp.Text = "语音求助";
-                                    }
-                                }; break;
-                            case "1": //呼叫待接听
-                                {
-                                    if (btnHelp.Text != "呼叫中")
-                                    {
-                                        btnHelp.BackColor = Color.Red;
-                                        btnHelp.Text = "呼叫中";
-                                    }
-                                }; break;
-                            case "2": //呼叫已接听
-                                {
-                                    if (btnHelp.Text != "已接听")
-                                    {
-                                        btnHelp.BackColor = Color.Green;
-                                        btnHelp.Text = "已接听";
-                                    }
-                                }; break;
-                        }
-                    }
-                    #endregion 1、求助按钮控制
-
-                    #region 界面未锁定的情况下,初始设置值<车号、监控界面交互、设置初始的毛皮类型>
-                    if (!PbCache.isLockFrm)
-                    {
-                        //ucWeightT1.setWgt(PbCache.collect.weight);
-                        //周俊伶注释
-                        //ucWeightT1.setWgt(Math.Round((double)PbCache.collect.weight / 1000, 2)); //2021年5月10日界面显示单位,调整为T
-                        //ucWeightT1.setStable(PbCache.collect.weightStatus != 1 ? true : false);
-                        //ucWeightT1.setExceed(PbCache.collect.weight > PbCache.range.upperRange ? false : true);
-
-                        //2021年5月10日界面显示单位,调整为T
-                        ucWeightCarTJXJG1.setWgt(Math.Round((double)PbCache.collect.weight / 1000, 2));
-                        // 修改界面过磅状态红/绿图标
-                        ucWeightCarTJXJG1.setStable(PbCache.collect.weightStatus != 1 ? true : false);
-
-                        #region 远程计量交互代码
-
-                        //如果处于远程计量状态,且远程保存完成了,则提示保存完成,让司机知道
-                        if (PbCache.monitor != null)// && PbCache.collect.weight > 500)
-                        {
-                            if (!string.IsNullOrEmpty(PbCache.monitor.isOverWgt) && PbCache.monitor.isTakeOver == "2" && !isOverSound) //&& !PbCache.isLockFrm)
-                            {
-                                ucWeightCarTJXJG1.setWgtBackColor(true);//称重完成后,显示颜色;
-                                                                        //txtMsgInfo.Text = "计量完成";
-                                setMsg("计量完成");
-                                vicPlayClass.GetVoicePlay("计量完成,请离开秤台", PbCache.collect.carno);
-                                PbCache.voiceType = 1;
-                                isMeasureSuccess = true;
-                                isOverSound = true;
-                                Print1(PbCache.monitor.isOverWgt);
-                                return;
-                            }
-
-                            if (PbCache.monitor.isTakeOver == "2" || !string.IsNullOrEmpty(PbCache.monitor.isOverWgt))
-                            {
-                                btnSave.Visible = false;
-                                bRelation = true;
-                                lg.WriteLog(14, "车号:" + PbCache.collect.carno + ";远程计量完成后,保存按钮隐藏!");
-                                if (!txtMsgInfo.Text.Contains("计量完成") && PbCache.monitor.isTakeOver == "2")
-                                {
-                                    //txtMsgInfo.Text = "正在远程计量,请等待处理!!";
-                                    setMsg("正在远程计量,请等待处理!!");
-                                }
-                                if (!txtMsgInfo.Text.Contains("计量完成") && !string.IsNullOrEmpty(PbCache.monitor.isOverWgt))
-                                {
-                                    //txtMsgInfo.Text = "本次计量称重已经完成,车辆请下秤!!";
-                                    setMsg("本次计量称重已经完成,车辆请下秤!!");
-                                }
-                                return;
-                            }
-                        }
-
-                        #endregion 远程计量交互代码
-
-                        if (string.IsNullOrEmpty(TrackCarNo))
-                        {
-                            txtCarNo.Text = PbCache.collect.carno;
-                        }
-                        else
-                        {
-                            txtCarNo.Text = TrackCarNo;
-
-                            if (PbCache.collect != null && !string.IsNullOrEmpty(PbCache.collect.carno))
-                            {
-                                if (TrackCarNo != PbCache.collect.carno)
-                                {
-                                    if (PbCache.monitor.carErr != "1") //写入一次车号异常
-                                    {
-                                        monitorcarErr1.pointNo = PbCache.sportInfo.baseSpotNo;
-                                        monitorcarErr1.carErr = "1";
-                                        rmsMonitorcarErr1 = monitor.doUpdateWf(monitorcarErr1);
-                                    }
-                                }
-                                else if (PbCache.monitor.carErr == "1") //若车号相等,但是之前写了一次车号异常,此时要改为车号正常
-                                {
-                                    monitorcarErr2.pointNo = PbCache.sportInfo.baseSpotNo;
-                                    monitorcarErr2.carErr = "0";
-                                    rmsMonitorcarErr2 = monitor.doUpdateWf(monitorcarErr2);
-                                }
-                            }
-
-                            // ??BourneCao 酒钢不可能预报车号和识别车号不一致
-                            preTrackScaleVCarNo.carNo = TrackCarNo;
-                            vCarNo.ValidMethod(preTrackScaleVCarNo);
-
-                            if (TrackCarNo != PbCache.collect.carno && !PbCache.monitorResult.valid_carno)
-                            {
-                                // 2021年5月11日 未识别到车牌号,进行提示,避免出现重新扫码点保存的情况
-                                if (string.IsNullOrEmpty(PbCache.collect.carno))
-                                {
-                                    //txtMsgInfo.Text = string.Format("摄像头未识别到车牌号,不允许进行【保存】操作,请点击语音求助!");
-                                    setMsg(string.Format("摄像头未识别到车牌号,不允许进行【保存】操作,请点击语音求助!"));
-                                    lg.WriteLog(14, "摄像头未识别到车牌号,不允许进行【保存】操作,请点击语音求助!");
-                                }
-                                else
-                                {
-                                    //txtMsgInfo.Text = string.Format("预报车号【{0}】与摄像头识别车号【{1}】不一致,请点击语音求助", TrackCarNo, PbCache.collect.carno);
-                                    setMsg(string.Format("预报车号【{0}】与摄像头识别车号【{1}】不一致,请点击语音求助", TrackCarNo, PbCache.collect.carno));
-                                    lg.WriteLog(14, "车号:" + PbCache.collect.carno + ";预报车号" + TrackCarNo + "与摄像头识别车号" + PbCache.collect.carno + "不一致!");
-                                }
-                                btnSave.Visible = false;
-                                return;
-                            }
-                            else
-                            {
-                                if (txtMsgInfo.Text.Contains("摄像头"))
-                                {
-                                    txtMsgInfo.Text = ""; //将原来的不允许计量的提示给去掉
-                                    setMsg("");
-                                }
-                                PbCache.collect.carno = TrackCarNo;
-
-                            }
-                        }
-                    }
-
-                    #endregion 界面未锁定的情况下,初始设置值<车号、监控界面交互、设置初始的毛皮类型>
-
-                    #region 红外对射及量程验证及停留超时验证
-
-                    valid.ValidMethod();
-
-                    if (PbCache.range != null && PbCache.range.upperRange < PbCache.collect.weight)
-                    {
-                        //超量程
-                        if (!isPlayRangeVoice)
-                        {
-                            vicPlayClass.GetVoicePlay("已超量程", PbCache.collect.carno);
-                            //txtMsgInfo.Text = "当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!";
-                            setMsg("当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!");
-                            isPlayRangeVoice = true;
-                            return;
-                        }
-                    }
-                    if (PbCache.collect.weightStatus == 0 && !PbCache.monitorResult.valid_park_status)
-                    {
-                        //重量稳定,且对射验证不合格
-                        if (!isPlayCalibVoice)
-                        {
-                            vicPlayClass.GetVoicePlay("车辆超出秤台,请调整车位", PbCache.collect.carno);
-                            //txtMsgInfo.Text = "车辆超出秤台,请调整车位";//timer1_Tick
-                            setMsg("车辆超出秤台,请调整车位");
-                            PbCache.ResultMessage = "车辆超出秤台,请调整车位"; //btnSave_Click
-                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车辆超出秤台,请调整车位");
-                            isPlayCalibVoice = true;
-                            return;
-                        }
-                    }
-                    if (PbCache.isOvertimeAlarm)
-                    {
-                        //停留超时提醒,不作为计量卡控的条件
-                        //if (!isPlayOvertimeVoice && !PbCache.isLockFrm)
-                        //{
-                        //    vicPlayClass.GetVoicePlay("停留超时", PbCache.collect.carno);
-                        //    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "停留超时");
-                        //    txtMsgInfo.Text = "停留超时";
-                        //    PbCache.ResultMessage = "停留超时";
-                        //    isPlayOvertimeVoice = true;
-                        //    return;
-                        //}
-                    }
-
-                    #region 模拟APP
-                    if (!string.IsNullOrEmpty(PbCache.collect.carno))
-                    {
-                        if (ConfigurationManager.AppSettings["carAdd"].ToString().Trim() == "1")
-                        {
-                            string sqls = "UPDATE METER_BASE_APP_TEST SET CAR_NO= '" + PbCache.collect.carno + "' where ID = 1";
-                            pbpAppTimer.executeSqlDataWf(sqls);
-                        }
-                    }
-                    #endregion
-
-                    #endregion 红外对射及量程验证及停留超时验证
-
-
-                    #region 查一次是否校秤,若未校秤则不能计量
-
-                    //*
-                    if (bRelation)
-                    {
-                        meterWorkCalibrationMainTimer.baseSpotNo = PbCache.sportInfo.baseSpotNo;
-                        meterWorkCalibrationMainTimer.valueFlag = "2";
-                        string msgInfo = "";
-                        isCalibration = vCalib.ValidMethod(meterWorkCalibrationMainTimer, out msgInfo);
-                        bRelation = false;
-                    }
-
-                    if (!isCalibration)
-                    {
-                        calibraNumRelTimer = PbCache.ltBaseCalibraNumRel.Where(s => s.baseSpotNo == PbCache.sportInfo.baseSpotNo).FirstOrDefault();
-                        if (calibraNumRelTimer == null || calibraNumRelTimer.isMeter == "否" || PbCache.collect.weight > (calibraNumRelTimer.upWeight == null ? 0 : calibraNumRelTimer.upWeight.Value))
-                        {
-                            if (!bXCStart)
-                            {
-                                vicPlayClass.GetVoicePlay("未校秤", "");
-                                bXCStart = true;
-                            }
-                            //txtMsgInfo.Text = "未校秤无法计量";
-                            setMsg("未校秤无法计量");
-                            return;
-                        }
-                    }
-                    //*/
-
-                    #endregion 查一次是否校秤,若未校秤则不能计量
-
-                    #region 判断是否需要复磅
-
-                    if (isShowRecover && !string.IsNullOrEmpty(txtCarNo.Text))
-                    {
-                        recoverInfo.ValidMethod(txtCarNo.Text);
-                        if (PbCache.isAllowRecover)
-                        {
-                            btnRecover.Visible = true;
-                        }
-                        else
-                        {
-                            btnRecover.Visible = false;
-                        }
-                        isShowRecover = false;
-                    }
-
-                    #endregion 判断是否需要复磅
-
-                    #region 判断区域是否正确
-
-                    //if (PbCache.monitor.validArea == "1")
-                    //{
-                    //    if (areaInfo.ValidMethod(PbCache.sportInfo, txtCarNo.Text))
-                    //    {
-                    //        btnSave.Enabled = true;
-                    //    }
-                    //    else
-                    //    {
-                    //        btnSave.Enabled = false;
-                    //    }
-                    //}
-                    #endregion 判断是否需要复磅
-
-                    if (!string.IsNullOrEmpty(PbCache.collect.carno))
-                    {
-                        resCarListTimer = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.collect.carno, validFlag = "0" });
-                        if (resCarListTimer.Data == null || resCarListTimer.Data.Count == 0 || resCarListTimer.Data.Count != 1)
-                        {
-                            if (!registerCar)
-                            {
-                                carService.addCar(new MeterBaseCar { carNo = PbCache.collect.carno, carTypeNo = AppConfigCache.carTypeNo, carTypeName = AppConfigCache.carTypeName });
-                                registerCar = true;
-                            }
-
-                        }
-                    }
-
-                    #region 第一次查询,有车号,重量稳定,红外验证通过的情况只查一次
-
-                    //如果没有查过一次,且扫描到车号信息,且重量稳定
-                    if ((bRailwayActual || sPreCarNo != TrackCarNo || firstCode != PbCache.strCode) && PbCache.collect.weightStatus == 0 && PbCache.monitorResult.valid_park_status)
-                    {
-                        firstWgt = 0;
-                        sPreCarNo = TrackCarNo;
-                        //判断车辆是厂内车还是厂外车
-                        if (string.IsNullOrEmpty(PbCache.collect.carno))
-                        {
-                            //txtMsgInfo.Text = "车号未识别,请联系处理";
-                            setMsg("车号未识别,请联系处理");
-                            PbCache.monitorResultMessage = "车号未识别,请联系处理";
-                            PbCache.ResultMessage = "车号未识别,请联系处理";
-                            vicPlayClass.GetVoicePlay("车号为空,请联系处理", PbCache.collect.carno);
-                            led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, "车号未识别,请联系处理");
-                            return;
-                        }
-
-
-                        resCarListScaleTimer = carService.doQueryCarList(new MeterBaseCar { carNo = PbCache.collect.carno, validFlag = "0" });
-                        if (resCarListScaleTimer.Succeed)
-                        {
-                            if (resCarListScaleTimer.Data != null && resCarListScaleTimer.Data.Count == 1)
-                            {
-                                carScaleTimer = resCarListScaleTimer.Data[0];
-                                //厂内车辆
-                                if (carScaleTimer.carTypeNo == "001004003")
-                                {
-                                    btnSelPreType.Visible = true;
-                                    preTrackScaleCarTimer.carNo = PbCache.collect.carno;
-                                    preTrackScaleCarTimer.lineDesc = "1";
-                                    rmScaleListCarTimer = PreTrackScaleService.doQueryByFlag(preTrackScaleCarTimer);
-
-                                    if (rmScaleListCarTimer.Succeed)
-                                    {
-                                        if (rmScaleListCarTimer.Data != null && rmScaleListCarTimer.Data.Count == 1)
-                                        {
-                                            firstWgt = rmScaleListCarTimer.Data[0].meterWeight == null ? 0 : rmScaleListCarTimer.Data[0].meterWeight.Value;
-                                            actualFirstTimer = entityBaseTimer1.format<MeterWorkCarActualFirst>(rmScaleListCarTimer.Data[0], actualFirstTimer);
-                                            actualFirstTimer.predictionNo = actualFirstTimer.predictionNo.Replace("_", "");
-                                            //给用户控件设置值
-                                            ucCarMeterInfoJisco1.setFormControlValue(actualFirstTimer);
-                                        }
-                                    }
-                                    bRailwayActual = false;
-                                }
-                                //厂外车辆
-                                else if (carScaleTimer.carTypeNo == "001004002" && !PbCache.isPre)
-                                {
-                                    #region 查询一次计量表中是否存在一条未结净的数据,非一车联运情况扫码两次,一车联运的话
-                                    outFirstTimer.carNo = PbCache.collect.carno;
-                                    outFirstTimer.valueFlag = "1";
-                                    RESTfulResultOutTimer = workCarActualFirstService.doQueryWf(outFirstTimer);
-                                    if (RESTfulResultOutTimer.Succeed)
-                                    {
-                                        if (RESTfulResultOutTimer.Data != null && RESTfulResultOutTimer.Data.Count > 0)
-                                        {
-                                            if (PbCache.sportInfo.baseSpotNo == lianDaPointNo)
-                                            {
-                                                bool flag = false;
-                                                foreach (MeterWorkCarActualFirst fs in RESTfulResultOutTimer.Data)
-                                                {
-                                                    //联达磅过的联达物料
-                                                    if (fs.predictionNo.Contains("_"))
-                                                    {
-                                                        firstWgt = fs.meterWeight.Value;
-                                                        firstDb = fs;
-                                                        firstDb.predictionNo = firstDb.predictionNo.Replace("_", "");
-                                                        //给用户控件设置值
-                                                        ucCarMeterInfoJisco1.setFormControlValue(firstDb);
-                                                        flag = true;
-                                                        break;
-                                                    }
-                                                }
-                                                if (!flag)
-                                                {
-                                                    firstWgt = RESTfulResultOutTimer.Data[0].meterWeight.Value;
-                                                    firstDb = RESTfulResultOutTimer.Data[0];
-                                                    firstDb.predictionNo = firstDb.predictionNo.Replace("_", "");
-                                                    //给用户控件设置值
-                                                    ucCarMeterInfoJisco1.setFormControlValue(firstDb);
-                                                }
-                                            }
-                                            else
-                                            {
-                                                foreach (MeterWorkCarActualFirst fs in RESTfulResultOutTimer.Data)
-                                                {
-                                                    if (fs.predictionNo != null && !fs.predictionNo.Contains("_"))
-                                                    {
-                                                        firstWgt = RESTfulResultOutTimer.Data[0].meterWeight.Value;
-                                                        firstDb = RESTfulResultOutTimer.Data[0];
-                                                        firstDb.predictionNo = firstDb.predictionNo.Replace("_", "");
-                                                        //给用户控件设置值
-                                                        ucCarMeterInfoJisco1.setFormControlValue(firstDb);
-                                                        break;
-                                                    }
-                                                }
-                                            }
-                                        }
-                                    }
-                                    #endregion
-                                    bRailwayActual = false;
-                                }
-                                else if (PbCache.isPre)
-                                {
-                                    ucCarMeterInfoJisco1.setFormControlValue(PbCache.mwPreFirst);
-                                    bRailwayActual = false;
-                                }
-                            }
-                            else
-                            {
-                                string ledinfo = "";
-                                if (PbCache.lockCarNo == "")
-                                {
-                                    isStop = true;
-                                    if (string.IsNullOrEmpty(PbCache.collect.carno))
-                                    {
-                                        //txtMsgInfo.Text = "车号未识别,请联系处理";
-                                        setMsg("车号未识别,请联系处理");
-                                        PbCache.monitorResultMessage = "车号未识别,请联系处理";
-                                        PbCache.ResultMessage = "车号未识别,请联系处理";
-                                        ledinfo = "车号未识别,请联系处理";
-                                        vicPlayClass.GetVoicePlay("车号为空,请联系处理", PbCache.collect.carno);
-                                    }
-                                    else
-                                    {
-                                        //txtMsgInfo.Text = "车号未注册,请联系处理";
-                                        setMsg("车号未注册,请联系处理");
-                                        PbCache.monitorResultMessage = "车号未注册,请联系处理";
-                                        PbCache.ResultMessage = "车号未注册,请联系处理";
-                                        ledinfo = "车号未注册,请联系处理";
-                                        vicPlayClass.GetVoicePlay("车号未注册,请联系处理", PbCache.collect.carno);
-                                    }
-
-                                    PbCache.isLockFrm = false;
-                                    //btnSave.Enabled = true;//rxh add
-                                    setMsgInfo(btnSave, "true", "2");//rxh add
-
-                                    rtInfo rt = new rtInfo();
-                                    rt.isWarn = true;
-                                    rt.WarnContent = "carErr";
-                                    Monitor(rt);
-
-                                    if (!string.IsNullOrEmpty(PbCache.collect.carno))
-                                    {
-
-                                        resgiterCarTimer.carNo = PbCache.collect.carno;
-                                        resgiterCarTimer.carTypeNo = AppConfigCache.carTypeNo;
-                                        resgiterCarTimer.carTypeName = AppConfigCache.carTypeName;
-                                        lg.WriteLog(30, string.Format("车号注册参数-车号:{0},车辆类型编号:{1},车辆类型名称:{2}", PbCache.collect.carno, AppConfigCache.carTypeNo, AppConfigCache.carTypeName));
-                                        resResgiterCarTimer = carService.addCar(resgiterCarTimer);
-                                        lg.WriteLog(30, resResgiterCarTimer.Succeed ? "注册成功" : "注册失败,原因:" + resResgiterCarTimer.ResultMessage);
-                                    }
-                                    led_controler.setStaticLineMsg(PbCache.sportInfo.ledIp, ledinfo);
-                                    bRailwayActual = false;
-                                    isStop = false;
-                                    return;
-                                }
-                            }
-                        }
-                        #region 查一次是否可留期限皮,可以则显示按钮
-
-                        PbCache.lockWgt = PbCache.collect.weight;
-
-                        //2021年3月15日 期限皮重显示按钮的显示方法修改 isShowBtnTare   ValidMethod
-                        //if (termTareCar.isShowBtnTare(TrackCarNo))
-                        //{
-                        //  lg.WriteLog(3, string.Format("9车辆[{0}进入期限皮重显示按钮的显示判断", TrackCarNo));
-                        //  btnTare.Visible = true;
-                        //}
-                        //
-
-                        #endregion 查一次是否可留期限皮,可以则显示按钮
-                    }
-
-                    #endregion 第一次查询,有车号,重量稳定,红外验证通过的情况只查一次
-
-
-                    #region 毛皮净赋值;存在一次重量firstWgt的情况下才赋值毛皮净重
-
-                    if (PbCache.collect.weightStatus == 0 && firstWgt > 500)
-                    {
-                        if (Math.Abs(firstWgt - PbCache.collect.weight) > AppConfigCache.differenceWgt)
-                        {
-                            //2021年5月10日界面显示单位,调整为T
-                            if (PbCache.collect.weight > firstWgt)
-                            {
-                                //txtGroess.Text = Math.Round((double)PbCache.collect.weight / 1000, 2) + "";
-                                //txtTare.Text = Math.Round(firstWgt / 1000, 2) + "";
-                                //rxh modify
-                                setMsgInfo(txtGroess, Math.Round((double)PbCache.collect.weight / 1000, 2) + "", "0");
-                                setMsgInfo(txtTare, Math.Round(firstWgt / 1000, 2) + "", "0");
-                            }
-                            else
-                            {
-                                //txtTare.Text = Math.Round((double)PbCache.collect.weight / 1000, 2) + "";
-                                //txtGroess.Text = Math.Round(firstWgt / 1000, 2) + "";
-                                //rxh modify
-                                setMsgInfo(txtTare, Math.Round((double)PbCache.collect.weight / 1000, 2) + "", "0");
-                                setMsgInfo(txtGroess, Math.Round(firstWgt / 1000, 2) + "", "0");
-                            }
-                            //txtNet.Text = Math.Round(Math.Abs(PbCache.collect.weight - firstWgt) / 1000, 2) + "";
-                            //rxh modify
-                            setMsgInfo(txtNet, Math.Round(Math.Abs(PbCache.collect.weight - firstWgt) / 1000, 2) + "", "0");
-                        }
-                    }
-
-                    #endregion 毛皮净赋值;存在一次重量firstWgt的情况下才赋值毛皮净重
-
-                    #region 界面未锁定的情况下,如果,有车号,重量稳定了,停车线验证通过,完成了扫码验证
-
-                    //没有远程接管,且已查过一次数据,且界面未锁定的情况下,如果,有车号,重量稳定了,停车线验证通过,完成了扫码验证的情况下,则按钮可用
-                    if (PbCache.monitor != null && PbCache.monitor.isTakeOver == "0" && !bRailwayActual && !string.IsNullOrEmpty(PbCache.collect.carno)
-                        && PbCache.collect.weightStatus == 0 && ucWeightT1.isGreenWgt)
-                    {
-                        if (!PbCache.isLockFrm)
-                        {
-                            if (!btnSave.Visible)//PbCache.isLockFrm
-                            {
-                                //btnSave.Visible = true;//rxh delete
-                                setMsgInfo(btnSave, "true", "2");//rxh add
-                            }
-                            if (!isVoiceDownCar)
-                            {
-                                isVoiceDownCar = true;
-                                lg.WriteLog(25, PbCache.lockCarNo + "GetVoicePlay前");
-                                vicPlayClass.GetVoicePlay("车上人员请下车", PbCache.collect.carno);
-                                //txtMsgInfo.Text = "请核对车号后,扫描您手机中的二维码";
-                            }
-                            // 如果计量点配置中,设置了秤点计量类型为智能计量(下秤),验证扫码信息是否与识别车号一致。
-                            // 如果为是,自动保存
-                            //3秒后自动执行保存方法
-
-                            if (!PbCache.isSelFrmMat)
-                            {
-                                lg.WriteLog(25, PbCache.lockCarNo + "Sleep前点击保存按钮");
-                                Thread.Sleep(3000);
-                                lg.WriteLog(25, PbCache.lockCarNo + "Sleep后点击保存按钮");
-                                if (PbCache.collect.weight > 500)
-                                {
-                                    //this.btnSave.PerformClick();//rxh deleted
-                                    setMsgInfo(btnSave, "true", "7");//rxh add
-                                }
-                                lg.WriteLog(25, PbCache.lockCarNo + "PerformClick后保存按钮");
-                            }
-                        }
-                        else if (PbCache.monitor.validMatClick == "0")
-                        {
-                            //已锁定 && !PbCache.isLockFrm 
-                            if (!btnSave.Enabled)
-                            {
-                                PbCache.isLockFrm = false;
-                                //btnSave.Enabled = true;//rxh delete
-                                setMsgInfo(btnSave, "true", "2");//rxh add
-                            }
-                        }
-
-                    }
-                    else
-                    {
-                        //2021年12月30日 添加提示信息
-                        if (!PbCache.isLockFrm)
-                        {
-                            if (PbCache.monitor.isTakeOver == "1")
-                            {
-                                lblog = "正在进行派位,不允许进行自助计量,请点击【语音求助】,联系计量大厅处理!";
-                                DoShowlbLog(lblog);
-                            }
-                            if (PbCache.monitor.isTakeOver == "2")
-                            {
-                                lblog = "正在进行远程计量,请等待计量大厅处理!";
-                                DoShowlbLog(lblog);
-                            }
-                        }
-
-                        if (btnSave.Visible && !PbCache.isLockFrm)
-                        {
-                            //btnSave.Visible = false;//rxh delete
-                            setMsgInfo(btnSave, "false", "2");//rxh add
-                            lg.WriteLog(14, "车号:" + PbCache.collect.carno + ";对射没对准【" + PbCache.monitorResult.valid_park_status + "】" +
-                                "||重量不是绿色【" + ucWeightT1.isGreenWgt + "】" +
-                                "||重量不稳定 0:重量稳定; 1:重量不稳定;  2:空磅【" + PbCache.collect.weightStatus + "】" +
-                                "||不是智能计量状态【" + PbCache.monitor.isTakeOver + "】" +
-                                "||扫码编号为空隐藏【" + firstCode + "】" +
-                                "||一次计量数据已经查询完成【" + bRailwayActual + "】" +
-                                "||界面已锁定【" + PbCache.isLockFrm + "】,保存按钮隐藏!");
-                        }
-                    }
-
-                    #endregion 界面未锁定的情况下,如果,有车号,重量稳定了,停车线验证通过,完成了扫码验证
-
-                }
-                catch (Exception ex)
-                {
-                    lg.WriteLog(13, "frmOneYardToEnd页面timer1异常!异常信息:" + ex);
-                }
-            }
-        }
-        #region 信息提示框
-        //rxh add
-        public void setMsgInfo(Control control, string ResultMessage, string sType)
-        {
-            setMsgMsg(control, ResultMessage, sType);
-        }
-        private void setMsgMsg(Control control, string ResultMessage, string sType)
-        {
-            if (control.InvokeRequired)
-            {
-                Action<Control, string, string> action = new Action<Control, string, string>(setMsgInfo);
-                Invoke(action, new object[] { control, ResultMessage, sType });
-            }
-            else
-            {
-                switch (sType)
-                {
-                    case "0":
-                        control.Text = ResultMessage;
-                        ; break;
-                    case "1":
-                        control.Enabled = ResultMessage == "true" ? true : false;
-                        ; break;
-                    case "2":
-                        control.Visible = ResultMessage == "true" ? true : false;
-                        ; break;
-                    case "3":
-                        ((RadioButton)control).Checked = ResultMessage == "true" ? true : false;
-                        break;
-                    case "4":
-                        ((ComboBox)control).SelectedValue = ResultMessage;
-                        break;
-                    case "5":
-                        ((RadioButton)control).Visible = ResultMessage == "true" ? true : false;
-                        break;
-                    case "6":
-                        ((CheckBox)control).Checked = ResultMessage == "true" ? true : false;
-                        break;
-                    case "7":
-                        ((Button)control).PerformClick();
-                        break;
-                    default: break;
-                }
-            }
-        }
-
-        #endregion 信息提示框
-        /// <summary>
-        /// 是否是联达物料 0否1是
-        /// </summary>
-        /// <param name="matterNo"></param>
-        /// <returns></returns>
-        private bool setLianDaMat(string matterNo)
-        {
-            if (lianDaQuery == null)
-            {
-                RESTfulResult<MeterBaseMatterInfo> result = matterInfoService.doQueryId(matterNo);
-                if (result.Succeed)
-                {
-                    lianDaQuery = new PbModelDb();
-                    lianDaQuery.id = matterNo;
-                    //是联达的物料
-                    if (result.Data != null && result.Data.isLianda == "1")
-                    {
-                        lianDaQuery.text = "1";
-                    }
-                    else
-                    {
-                        lianDaQuery.text = "0";
-                    }
-                }
-                else
-                {
-                    return false;
-                }
-            }
-            return true;
-        }
-
-
-        #region 信息提示框
-
-        private string lblog;//信息显示
-
-        public string Lblog//信息显示
-        {
-            get { return lblog; }
-            set
-            {
-                lblog = value;
-                DoShowlbLog(value);
-            }
-        }
-
-        private delegate void ShowlbLog(string lblog);
-
-        private void DoShowlbLog(string _lbLog)
-        {
-            if (this.txtMsgInfo.InvokeRequired)
-            {//在线程里以安全方式调用控件
-                ShowlbLog _MyInvokeOne = new ShowlbLog(DoShowlbLog);
-                txtMsgInfo.Invoke(_MyInvokeOne, new object[] { _lbLog });
-            }
-            else
-            {
-                txtMsgInfo.Text = _lbLog;
-                if (!string.IsNullOrEmpty(PbCache.ResultMessage) && _lbLog != PbCache.ResultMessage)
-                {
-                    PbCache.ResultMessage = _lbLog;
-                }
-            }
-            //2021年3月13日;不管是哪一种方式调用界面控件的值,均记录现场日志
-            if (!string.IsNullOrEmpty(lblog) && PbCache.collect != null)
-            {
-                lg.WriteLog(9, "[" + PbCache.collect.carno + "||" + PbCache.lockCarNo + "]" + lblog);
-            }
-            #region 记录从上秤到下秤的所有的提示信息
-            if (!string.IsNullOrEmpty(PbCache.resultMsgAll) && !PbCache.resultMsgAll.Contains(PbCache.ResultMessage) && !string.IsNullOrEmpty(PbCache.ResultMessage))
-            {
-                PbCache.resultMsgAll = PbCache.resultMsgAll + " || " + PbCache.ResultMessage;
-            }
-            else if (string.IsNullOrEmpty(PbCache.resultMsgAll) && !string.IsNullOrEmpty(PbCache.ResultMessage))
-            {
-                PbCache.resultMsgAll = PbCache.ResultMessage;
-            }
-            else
-            {
-                //提示信息重复,不做处理
-            }
-            #endregion 记录从上秤到下秤的所有的提示信息
-        }
-
-        #endregion 信息提示框
-
-
-        #region 打印
-
-        private string strFirstNo = "";
-
-        private class PrintCls
-        {
-            public int printNum { get; set; }
-            public MeterWorkCarActual printDb { get; set; }
-            public int iType { get; set; } //0毛 1 皮 2净
-            public string qrCode { get; set; }
-        }
-
-        private PrintCls printData = new PrintCls();
-
-        private void Print1(string firstNo)
-        {
-            try
-            {
-                //lg.WriteLog(1, "打印开始");
-
-                #region 获取打印信息,若需要打印则调用打印操作
-
-                List<PrintCls> prrintC = new List<PrintCls>();
-
-                string sql = @"select actual_no actualNo,
-                                   prediction_no predictionNo,
-                                   car_no carNo,
-                                   matter_no matterNo,
-                                   matter_name matterName,
-                                   gross_weight grossWeight,
-                                   gross_time grossTime,
-                                   tare_weight tareWeight,
-                                   tare_time tareTime,
-                                   net_weight netWeight,
-                                   net_Time netTime,
-                                   'x' meterTypeNo,
-                                   meter_type_name meterTypeName,
-                                   spec_name specName,
-                                   forwarding_unit_name forwardingUnitName,
-                                   receiving_uint_name receivingUintName,
-                                   load_point_name loadPointName,
-                                   add_weight addWeight,
-                                   '1' uploadFlag --1结净数据 0一次表数据
-                              from meter_work_car_actual where actual_first1_no = '" + firstNo + @"' or actual_first2_no='" + firstNo + @"'
-                            union all
-                            select t.actual_first_no      actualNo,
-                                   t.prediction_no        predictionNo,
-                                   t.car_no               carNo,
-                                   t.matter_no            matterNo,
-                                   t.matter_name          matterName,
-                                   t.meter_weight         grossWeight,
-                                   t.create_time          grossTime,
-                                   0                      tareWeight,
-                                   t.create_time          tareTime,
-                                   0                      netWeight,
-                                   null                   netTime,
-                                   t.weight_type          meterTypeNo, --0毛重 否则皮重
-                                   t.meter_type_name      meterTypeName,
-                                   t.spec_name            specName,
-                                   t.forwarding_unit_name forwardingUnitName,
-                                   t.receiving_uint_name  receivingUintName,
-                                   t.load_point_name      loadPointName,
-                                   t.add_weight addWeight,
-                                   '0' uploadFlag
-                              from METER_WORK_CAR_ACTUAL_FIRST t
-                                where t.actual_first_no = '" + firstNo + "' or  t.actual_first_no = (select max(actual_first2_no) from meter_work_car_actual where actual_first1_no='" + firstNo + "')";
-                //查下如果有毛重或者结净数据,则可进入打印判断
-                PbModelDbService<List<MeterWorkCarActual>> pbModelDbService = new PbModelDbService<List<MeterWorkCarActual>>();
-                RESTfulResult<List<MeterWorkCarActual>> rm = pbModelDbService.executeSqlDataWf(sql);
-
-                //lg.WriteLog(1, "打印第一个sql:" + sql);
-
-                if (rm.Succeed)
-                {
-                    if (rm.Data != null && rm.Data.Count > 0)
-                    {
-                        //2021年6月26日 对一车联运的进行处理;用一次计量编号查二次计量数据,
-                        sql = @"select t3.actual_no actualNo, t3.prediction_no predictionNo, t3.car_no carNo, t3.matter_no matterNo, t3.matter_name matterName,
-                                t3.gross_weight grossWeight, t3.gross_time grossTime, t3.tare_weight tareWeight, t3.tare_time tareTime, t3.net_weight netWeight,
-                                t3.net_Time netTime, 'x' meterTypeNo, t3.meter_type_name meterTypeName, t3.spec_name specName,
-                                t3.forwarding_unit_name forwardingUnitName, t3.receiving_uint_name receivingUintName, t3.load_point_name loadPointName,
-                                t3.add_weight addWeight, '1' uploadFlag from meter_work_car_actual_first t2
-                                  left join meter_work_car_actual t3 on t2.actual_first_no = t3.actual_first1_no
-                                 where t2.prediction_combination in (select t.prediction_combination
-                                           from meter_work_car_actual_first t
-                                      where t3.value_flag = '0' and t.actual_first_no = '" + firstNo + @"' and
-                                            instr(t.prediction_combination, '20') > 0) order by t3.net_time desc";
-                        RESTfulResult<List<MeterWorkCarActual>> rmLy = pbModelDbService.executeSqlDataWf(sql);
-                        if (rmLy.Succeed && rmLy.Data != null && rmLy.Data.Count == 1)
-                        {
-                            rm.Data = rmLy.Data; //一车联运,将毛重替换为净重数据
-                        }
-
-                        //若有毛重或者净重,找到对应数据的物料信息,若有,那么去找打印配置信息数据
-                        List<MeterWorkCarActual> mwa = rm.Data.Where(s => !string.IsNullOrEmpty(s.matterNo) && (s.meterTypeNo == "x" || s.meterTypeNo == "0")).ToList();
-                        if (mwa != null && mwa.Count > 0 && !string.IsNullOrEmpty(mwa[0].matterNo))
-                        {
-                            sql = @"select BASE_SPOT_NO    baseSpotNo,
-                                           load_point_no   loadPointNo,
-                                           matter_no       matterNo,
-                                           METER_TYPE_NO   meterTypeNo,
-                                           weight_type_name weightTypeName,
-                                           PRINT_NUM       printNum
-                                      from METER_BASE_BILL_PRINT
-                                     where matter_no = '" + mwa[0].matterNo + @"'
-                                       and nvl(METER_TYPE_NO, '" + PbCache.bussinessTypeCode + @"') = '" + PbCache.bussinessTypeCode + @"'
-                                       and nvl(BASE_SPOT_NO, '" + PbCache.sportInfo.baseSpotNo + @"') = '" + PbCache.sportInfo.baseSpotNo + @"'
-                                       and nvl(load_point_no, '" + (mwa[0].loadPointNo == null ? "1" : mwa[0].loadPointNo) + @"') = '" + (mwa[0].loadPointNo == null ? "1" : mwa[0].loadPointNo) + @"'";
-
-                            //lg.WriteLog(1, "打印第二个sql:" + sql);
-
-                            //and nvl(METER_TYPE_NO, '') = ''
-                            PbModelDbService<List<MeterBaseBillPrint>> pbPrintService = new PbModelDbService<List<MeterBaseBillPrint>>();
-                            RESTfulResult<List<MeterBaseBillPrint>> rmPint = pbPrintService.executeSqlDataWf(sql);
-                            if (rmPint.Succeed)
-                            {
-                                if (rmPint.Data != null && rmPint.Data.Count > 0)
-                                {
-                                    //若有净重信息:1毛重时间晚于皮重时间,则打印毛、皮、净重,2毛重早于皮重,打印皮、净
-                                    //若只有毛重信息则打印毛重
-                                    List<MeterBaseBillPrint> lGrossprint = rmPint.Data.Where(s => s.weightTypeName.Contains("毛")).ToList();
-                                    List<MeterBaseBillPrint> lTarePrint = rmPint.Data.Where(s => s.weightTypeName.Contains("皮")).ToList();
-                                    List<MeterBaseBillPrint> lNetprint = rmPint.Data.Where(s => s.weightTypeName.Contains("净")).ToList();
-
-                                    List<MeterWorkCarActual> mwaChild = mwa.Where(s => s.meterTypeNo == "x").ToList();
-                                    if (mwaChild != null && mwaChild.Count > 0) //若有净重信息
-                                    {
-                                        if (lTarePrint != null && lTarePrint.Count > 0)
-                                        {
-                                            //获取非毛,非净重信息如果没有则用的期限皮,此时不打,否则则打印
-                                            MeterWorkCarActual mwca = rm.Data.Where(s => s.meterTypeNo != "x" && s.meterTypeNo != "0").FirstOrDefault();
-                                            if (mwca != null)
-                                            {
-                                                PrintCls cls = new PrintCls();
-                                                cls.printNum = (int)(lTarePrint[0].printNum == null ? 0 : lTarePrint[0].printNum.Value);
-                                                cls.iType = 1;//皮重
-                                                cls.printDb = mwca;
-                                                prrintC.Add(cls);
-                                            }
-                                        }
-                                        if (lGrossprint != null && lGrossprint.Count > 0)
-                                        {
-                                            //获取毛重信息
-                                            MeterWorkCarActual mwca = rm.Data.Where(s => s.meterTypeNo == "0").FirstOrDefault();
-                                            if (mwca != null)
-                                            {
-                                                PrintCls cls = new PrintCls();
-                                                cls.printNum = (int)(lGrossprint[0].printNum == null ? 0 : lGrossprint[0].printNum.Value);
-                                                cls.iType = 0;//毛重
-                                                cls.printDb = mwca;
-                                                prrintC.Add(cls);
-                                            }
-                                        }
-                                        if (lNetprint != null && lNetprint.Count > 0)
-                                        {
-                                            //获取净重信息
-                                            MeterWorkCarActual mwca = rm.Data.Where(s => s.meterTypeNo == "x").FirstOrDefault();
-                                            if (mwca != null)
-                                            {
-                                                PrintCls cls = new PrintCls();
-                                                cls.printNum = (int)(lNetprint[0].printNum == null ? 0 : lNetprint[0].printNum.Value);
-                                                cls.iType = 2;//净重
-                                                cls.printDb = mwca;
-                                                prrintC.Add(cls);
-                                            }
-                                        }
-                                    }
-                                    else //只有毛重信息则打印毛重
-                                    {
-                                        if (lGrossprint != null && lGrossprint.Count > 0)
-                                        {
-                                            //获取毛重信息
-                                            MeterWorkCarActual mwca = rm.Data.Where(s => s.meterTypeNo == "0").FirstOrDefault();
-                                            if (mwca != null)
-                                            {
-                                                PrintCls cls = new PrintCls();
-                                                cls.printNum = (int)(lGrossprint[0].printNum == null ? 0 : lGrossprint[0].printNum.Value);
-                                                cls.iType = 0;//毛重
-                                                cls.printDb = mwca;
-                                                prrintC.Add(cls);
-                                            }
-                                        }
-                                    }
-
-                                    if (prrintC != null && prrintC.Count > 0)
-                                    {
-                                        FrmMessage frmMessage = FrmMess("是否打印第【1】张票据!", "打印");
-                                        if (frmMessage.ShowDialog(this) == DialogResult.OK)
-                                        {
-                                            lg.WriteLog(10, "车号【" + PbCache.lockCarNo + "】是否打印选择了【是】");
-                                            lg.WriteLog(15, PbCache.lockCarNo + "是否打印选择了【是】");
-                                            strFirstNo = firstNo;
-                                            //printDocument1.PrinterSettings.PrinterName = PbCache.sportInfo.printerName;//strPntSvrName;
-                                            System.Drawing.Printing.PaperSize customSize1 = new System.Drawing.Printing.PaperSize("TestPaper", 398, 433); //101mm*110mm,换算成英寸
-                                            printDocument1.DefaultPageSettings.PaperSize = customSize1;//将自定义的Papersize赋给PrintDocument
-                                            System.Drawing.Printing.Margins marginss = new System.Drawing.Printing.Margins(0, 0, 0, 0);
-                                            printDocument1.DefaultPageSettings.Margins = marginss;
-                                            printDocument1.PrintController = new System.Drawing.Printing.StandardPrintController();
-
-                                            foreach (PrintCls db in prrintC)
-                                            {
-                                                switch (db.printDb.meterTypeNo)
-                                                {
-                                                    case "0": //毛
-                                                        db.qrCode = db.printDb.actualNo + "," + db.printDb.grossWeight + "," + "1";
-                                                        break;
-
-                                                    case "x": //净
-                                                        db.qrCode = db.printDb.actualNo + "," + db.printDb.netWeight + "," + "2";
-                                                        break;
-
-                                                    default: //皮
-                                                        db.qrCode = db.printDb.actualNo + "," + db.printDb.grossWeight + "," + "1";
-                                                        break;
-                                                }
-                                                RESTfulResult<string> rQRCode = workCarActualFirstService.doQRCodeWf(db.qrCode);
-                                                db.qrCode = rQRCode.Data;
-
-                                                for (int i = 0; i < db.printNum; i++)
-                                                {
-                                                    if (i == 0)
-                                                    {
-                                                        printData = db;
-                                                        printDocument1.Print();
-                                                        lg.WriteLog(10, "当前第" + (i + 1) + "次打印:" + printData.iType + "  车号:" + db.printDb.carNo + ",二维码:" + db.qrCode);
-                                                    }
-                                                    else
-                                                    {
-                                                        FrmMessage frmMessageContinue = FrmMess("已打印【" + i + "】张,是否继续打印第【" + (i + 1) + "】张票据!", "打印");
-                                                        if (frmMessageContinue.ShowDialog(this) == DialogResult.OK)
-                                                        {
-                                                            printData = db;
-                                                            printDocument1.Print();
-                                                            lg.WriteLog(10, "当前第" + (i + 1) + "次打印:" + printData.iType + "  车号:" + db.printDb.carNo + ",二维码:" + db.qrCode);
-                                                        }
-                                                        else
-                                                        {
-                                                            lg.WriteLog(10, "车号【" + PbCache.lockCarNo + "】第" + i + "次是否打印,选择了【否】");
-                                                        }
-                                                    }
-                                                    //printData = db;
-                                                    //printDocument1.Print();
-                                                    //lg.WriteLog(11, "当前打印:" + printData.iType + "  车号:" + db.printDb.carNo);
-                                                }
-                                            }
-                                        }
-                                        else
-                                        {
-                                            lg.WriteLog(10, "车号【" + PbCache.lockCarNo + "】是否打印选择了【否】");
-                                            lg.WriteLog(15, PbCache.lockCarNo + "是否打印选择了【否】");
-                                        }
-                                    }
-                                }
-                            }
-                            else
-                            {
-                                lg.WriteLog(10, "车号【" + PbCache.lockCarNo + "】获取打印配置数据信息异常sql:【" + sql + "】");
-                            }
-                        }
-                    }
-                }
-                else
-                {
-                    lg.WriteLog(10, "车号【" + PbCache.lockCarNo + "】获取计量数据信息异常sql:【" + sql + "】");
-                }
-
-                #endregion 获取打印信息,若需要打印则调用打印操作
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(10, "车号【" + PbCache.lockCarNo + "】打印异常" + ex);
-            }
-        }
-
-        private void printDocument1_PrintPage(object sender, System.Drawing.Printing.PrintPageEventArgs e)
-        {
-            try
-            {
-                if (printData != null && printData.printDb != null)
-                {
-                    printClass.PrintAllPage(e, printData.printDb, printData.qrCode);
-
-                    /*
-                    //结净打印
-                    if (printData.iType == 2)
-                    {
-                        printClass.PrintPage(e, printData.printDb, PbCache.strQRCode);
-                    }
-                    else //非结净打印
-                    {
-                        printClass.PrintWgtPage(e, printData.printDb, PbCache.strQRCode);
-                    }
-                    //*/
-                }
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(11, "打印异常" + ex);
-            }
-        }
-
-        #endregion 打印
-
-        private void btnFH_Click(object sender, EventArgs e)
-        {
-            lg.WriteLog(15, PbCache.lockCarNo + "点击了返回主界面");
-            this.Hide();
-            hidWindow();
-        }
-
-        private static FrmMessage FrmMess(string strMess, string strBtnSaveInfo)
-        {
-            FrmMessage frmMessage = new FrmMessage();
-            frmMessage.StartPosition = FormStartPosition.Manual;
-            frmMessage.Location = new Point(350, 450);
-            frmMessage.ShowMessage = strMess;
-            frmMessage.BtnSaveText = strBtnSaveInfo;
-            frmMessage.BtnCancelText = "取消";
-            return frmMessage;
-        }
-
-        /// <summary>
-        /// 期限皮重保存
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnTare_Click(object sender, EventArgs e)
-        {
-            try
-            {
-                if (PbCache.collect == null) return;
-                //界面锁定
-                PbCache.lockWgt = PbCache.collect.weight;
-                if (PbCache.monitor.validCarno == "0")
-                {
-                    PbCache.collect.carno = TrackCarNo;
-                }
-                PbCache.lockCarNo = PbCache.collect.carno;
-                btnTare.Enabled = false;
-                PreTrackScale preTrack = ucCarMeterInfoJisco1._preTrack;
-                lg.WriteLog(15, PbCache.lockCarNo + "点击期限皮重按钮");
-
-                //计量已完成,不允许重复保存期限皮重
-                if (PbCache.isLockFrm)
-                {
-                    vicPlayClass.GetVoicePlay("不允许重复保存期限皮重", PbCache.collect.carno);
-                    PbCache.ResultMessage = "已经完成计量保存操作,不允许重复保存期限皮重!";
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-
-                #region 红外对射及量程验证
-                valid.ValidMethod();
-                if (PbCache.range != null && PbCache.range.upperRange < PbCache.collect.weight)
-                {
-                    //超量程
-                    vicPlayClass.GetVoicePlay("已超量程", PbCache.collect.carno);
-                    PbCache.ResultMessage = "当前重量已超量程,秤体量程为【" + PbCache.range.upperRange / 1000 + "】T,不允许进行自助计量操作!";
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-                else if (PbCache.collect.weightStatus == 0 && !PbCache.monitorResult.valid_park_status)
-                {
-                    //重量稳定,且对射验证不合格
-                    vicPlayClass.GetVoicePlay("您的车辆未停到位", PbCache.collect.carno);
-                    PbCache.ResultMessage = "您的车辆未停到位,请调整车辆位置,不要遮挡激光检测设备,不允许进行自助计量操作!";//btnTare_Click
-                    btnSave.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-                #endregion 红外对射及量程验证
-
-                //2021年3月13日 杨秀东新增逻辑,车号为空则不允许进行期限皮重保存操作
-                if (string.IsNullOrEmpty(PbCache.lockCarNo))
-                {
-                    vicPlayClass.GetVoicePlay("不允许进行期限皮重保存", PbCache.lockCarNo);
-                    PbCache.ResultMessage = "未抓拍到车牌号,进行期限皮重保存,请点[语音求助]!";
-                    setMsg(PbCache.ResultMessage);
-                    btnTare.Enabled = true;
-                    return;
-                }
-
-                //期限皮重业务是否能够保存验证;物资、业务类型、车号验证
-                if (!termTareCar.ValidMethodThree(preTrack))
-                {
-                    vicPlayClass.GetVoicePlay("不允许进行期限皮重保存", PbCache.lockCarNo);
-                    setMsg(PbCache.ResultMessage);
-                    btnTare.Enabled = true;
-                    return;
-                }
-
-                //查一次是否可留期限皮;重量验证
-                if (!termTareCar.ValidMethod(PbCache.lockCarNo))
-                {
-                    vicPlayClass.GetVoicePlay("不允许进行期限皮重保存", PbCache.lockCarNo);
-                    setMsg(PbCache.ResultMessage);
-                    btnTare.Enabled = true;
-                    return;
-                }
-
-                //若存在有效的一次计量数据,则不允许进行期限皮重保存
-                if (!termTareCar.ValidActualFirst(preTrack))
-                {
-                    vicPlayClass.GetVoicePlay("不允许进行期限皮重保存", PbCache.lockCarNo);
-                    setMsg(PbCache.ResultMessage);
-                    btnTare.Enabled = true;
-                    return;
-                }
-
-                //暂停取实时数据
-                setMsg("称重保存中......");
-                FrmMessage frmMessage = FrmMess("是否确认保存期限皮重!", "继续保存");
-                if (frmMessage.ShowDialog(this) == DialogResult.Cancel)
-                {
-                    setMsg("");
-                    btnTare.Enabled = true;
-                    lg.WriteLog(15, PbCache.lockCarNo + "期限皮重继续保存选择了【否】");
-                    return;
-                }
-
-                MeterBaseTermTareData mbttd = new MeterBaseTermTareData();
-                mbttd.baseSpotNo = PbCache.sportInfo.baseSpotNo;
-                mbttd.baseSpotName = PbCache.sportInfo.baseSpotName;
-                mbttd.carNo = PbCache.collect.carno;
-                mbttd.meterWeight = PbCache.lockWgt;
-                mbttd.valueFlag = "0";
-                mbttd.createTime = DateTime.Now;
-                mbttd.createManNo = PbCache.sportInfo.baseSpotNo;
-                mbttd.createManName = PbCache.sportInfo.baseSpotName;
-                mbttd.meterTime = mbttd.createTime.Value;
-                mbttd.startTime = mbttd.createTime.Value;
-
-                //操作日志
-                MeterMonitorNote monitorNote = new MeterMonitorNote();
-                monitorNote.baseSpotNo = mbttd.baseSpotNo;
-                monitorNote.baseSpotName = mbttd.baseSpotName;
-                monitorNote.operationContent = string.Format("保存期限皮重");
-                monitorNote.operationTime = mbttd.createTime.Value.ToString("yyyy-MM-dd HH:mm:ss");
-                monitorNote.carNo = mbttd.carNo;
-                monitorNote.meterNoteSource = "0";
-
-                //期限皮重数据保存
-                RESTfulResult<string> RESTfulResult = termTareDate.doSaveWf(mbttd, monitorNote);
-                if (RESTfulResult.Succeed && RESTfulResult.Code != "500")
-                {
-                    PbCache.isLockFrm = true;
-                    PbCache.actualFirstNo = RESTfulResult.Data;
-                    //称重完成后,显示颜色;
-                    _ = BeginInvoke(new Action(() => { ucWeightCarTJXJG1.setWgtBackColor(true); }));
-
-                    //称重完成后,显示重量类型为皮重;
-                    _ = BeginInvoke(new Action(() => { ucWeightCarTJXJG1.setWeightType("皮重"); }));
-
-                    //期限皮重成功截图
-                    _ = BeginInvoke(new Action(() => { shotImage(); }));
-
-                    //保存成功,语音提示保存成功
-                    vicPlayClass.GetVoicePlay("期限皮重保存成功", PbCache.lockCarNo);//播放语音
-                    btnTare.Visible = false;
-                    lg.WriteLog(3, string.Format("车号[{0}]期限皮重保存成功", PbCache.lockCarNo));
-                    setMsg("称重保存成功,请离开秤台!");
-                }
-                else
-                {
-                    PbCache.actualFirstNo = RESTfulResult.Data;
-                    //期限皮重失败截图
-                    _ = BeginInvoke(new Action(() => { shotImage(); }));
-                    btnTare.Enabled = true;
-                    setMsg(RESTfulResult.ResultMessage);
-                    vicPlayClass.GetVoicePlay("期限皮重保存失败", PbCache.lockCarNo);//播放语音
-                    lg.WriteLog(3, string.Format("车号[{0}]期限皮重保存失败", PbCache.lockCarNo));
-                }
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(13, PbCache.lockCarNo + "期限皮重事件异常:" + ex.Message);
-            }
-        }
-
-        /// <summary>
-        /// 复磅保存
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void btnRecover_Click(object sender, EventArgs e)
-        {
-            try
-            {
-                if (PbCache.collect == null) return;
-                PbCache.isLockFrm = true;
-                PbCache.lockCarNo = PbCache.collect.carno;
-                PbCache.lockWgt = PbCache.collect.weight;
-                btnRecover.Enabled = false;
-                lg.WriteLog(15, PbCache.lockCarNo + "点击【复磅】按钮");
-
-                //仪表重量验证
-                if (!dataValidity.ValidMethod(PbCache.lockWgt))
-                {
-                    //txtMsgInfo.Text = PbCache.ResultMessage;
-                    setMsg(PbCache.ResultMessage);
-                    return;
-                }
-
-                //验证是否满足复磅的条件
-                recoverInfo.ValidMethod(PbCache.lockCarNo);
-                if (!PbCache.isAllowRecover)
-                {
-                    PbCache.isLockFrm = false;
-                    btnRecover.Enabled = true;
-                    setMsg(PbCache.ResultMessage);
-                    lg.WriteLog(15, PbCache.lockCarNo + "不满足复磅条件!" + PbCache.ResultMessage);
-                    return;
-                }
-
-                //txtMsgInfo.Text = "复磅保存中......";
-                setMsg("复磅保存中......");
-                FrmMessage frmMessage = FrmMess("是否确认保存当前复磅重量数据!", "继续保存");
-                if (frmMessage.ShowDialog(this) == DialogResult.Cancel)
-                {
-                    PbCache.isLockFrm = false;
-                    btnRecover.Enabled = true;
-                    //txtMsgInfo.Text = "";
-                    setMsg("");
-                    lg.WriteLog(15, PbCache.lockCarNo + "【复磅】按钮选择否");
-                    return;
-                }
-
-                //复磅数据保存
-                RESTfulResult<string> RESTfulResult = carRecoverService.doRecover(new MeterWorkCarRecover { carNo = PbCache.lockCarNo, recMeterWeight = PbCache.lockWgt });
-                if (RESTfulResult.Succeed)
-                {
-                    //保存成功,语音提示保存成功
-                    vicPlayClass.GetVoicePlay("称重完成", PbCache.lockCarNo);//播放语音
-                    btnTare.Visible = false;
-                    lg.WriteLog(3, string.Format("车号[{0}]复磅保存成功", PbCache.lockCarNo));
-                    setMsg("复磅保存成功,请离开秤台!");
-                }
-                else
-                {
-                    PbCache.isLockFrm = false;
-                    btnRecover.Enabled = true;
-                    setMsg(RESTfulResult.ResultMessage);
-                    vicPlayClass.GetVoicePlay("称重数据保存失败", PbCache.lockCarNo);//播放语音
-                    lg.WriteLog(3, string.Format("车号[{0}]复磅保存失败" + RESTfulResult.Message, PbCache.lockCarNo));
-                }
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(13, PbCache.lockCarNo + "复磅保存事件异常:" + ex.Message);
-            }
-        }
-
-        #region 信息提示框
-
-        public void setMsgInfo(string ResultMessage)
-        {
-            setMsg(ResultMessage);
-        }
-
-        private void setMsg(string ResultMessage)
-        {
-            if (txtMsgInfo.InvokeRequired)
-            {
-                Action<string> action = new Action<string>(setMsgInfo);
-                Invoke(action, new object[] { ResultMessage });
-            }
-            else
-            {
-                txtMsgInfo.Text = ResultMessage;
-                if (!string.IsNullOrEmpty(PbCache.ResultMessage) && ResultMessage != PbCache.ResultMessage)
-                {
-                    PbCache.ResultMessage = ResultMessage;
-                }
-            }
-            if (!string.IsNullOrEmpty(ResultMessage) && PbCache.collect != null)
-            {
-                lg.WriteLog(9, "[" + PbCache.collect.carno + "||" + PbCache.lockCarNo + "]" + ResultMessage);
-            }
-
-            #region 记录从上秤到下秤的所有的提示信息
-            if (!string.IsNullOrEmpty(PbCache.resultMsgAll) && !PbCache.resultMsgAll.Contains(PbCache.ResultMessage) && !string.IsNullOrEmpty(PbCache.ResultMessage))
-            {
-                PbCache.resultMsgAll = PbCache.resultMsgAll + " || " + PbCache.ResultMessage;
-            }
-            else if (string.IsNullOrEmpty(PbCache.resultMsgAll) && !string.IsNullOrEmpty(PbCache.ResultMessage))
-            {
-                PbCache.resultMsgAll = PbCache.ResultMessage;
-            }
-            else
-            {
-                //提示信息重复,不做处理
-            }
-            #endregion 记录从上秤到下秤的所有的提示信息
-
-        }
-
-        #endregion 信息提示框
-
-        /// <summary>
-        /// 车号改变时,判断是否需要显示复磅按钮
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void txtCarNo_TextChanged(object sender, EventArgs e)
-        {
-
-        }
-
-        /// <summary>
-        /// 清空监控表的数据
-        /// </summary>
-        /// <param name="sender"></param>
-        /// <param name="e"></param>
-        private void frmOneYardToEnd_FormClosing(object sender, FormClosingEventArgs e)
-        {
-            hidWindow();
-        }
-
-        private void hidWindow()
-        {
-            try
-            {
-                lg.WriteLog(27, ("车号:" + (string.IsNullOrEmpty(temporaryCarNo) ? "未识别" : temporaryCarNo)) + ";重量:" + PbCache.resultWgt + ";提示信息:" + PbCache.resultMsgAll);
-                MeterWorkScheduledHelp meterWorkScheduledHelp1 = new MeterWorkScheduledHelp();
-                meterWorkScheduledHelp1.baseSpotNo = PbCache.sportInfo.baseSpotNo;
-                meterWorkScheduledHelp1.baseSpotName = PbCache.sportInfo.baseSpotName;
-                meterWorkScheduledHelp1.carNo = string.IsNullOrEmpty(PbCache.collect.carno) ? temporaryCarNo : PbCache.collect.carno;
-                meterWorkScheduledHelp1.helpContent = "车号:" + (string.IsNullOrEmpty(temporaryCarNo) ? "未识别" : temporaryCarNo) + ";重量:" + PbCache.resultWgt + ";提示信息:" + PbCache.resultMsgAll;
-                meterWorkScheduledHelp1.warmType = "4";
-                meterWorkScheduledHelp1.warmTypeName = "计量数据统计";
-                meterWorkScheduledHelpService.add(meterWorkScheduledHelp1);
-                //初始化一些线程及数据,并关闭该界面
-                if (PbCache.collect != null && !string.IsNullOrEmpty(PbCache.collect.carno))
-                {
-                    PbCache.collect.carno = "";
-                }
-                isShowRecover = true;//是否去查询“复磅”按钮的显示与否
-                PbCache.strCode = "";
-                PbCache.isOvertimeAlarm = false; //是否超时报警
-                PbCache.monitor.isOverWgt = "";
-                bRailwayActual = true; //为true时会重新查询一次计量数据
-                isShowRecover = true;//是否去查询“复磅”按钮的显示与否
-                
-                PbCache.Load();
-                //关闭一些线程及定时任务
-                // timer1.Stop();//rxh delete
-                //timer1.Enabled = false;//rxh delete
-               
-                                  //timer1.Dispose();
-
-                // 销毁对象
-                CleanObjectData();
-
-                #region 清理一次监控表的几个数值,防止上车速度过快导致提示称重完成
-
-                //RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor { pointNo = PbCache.sportInfo.baseSpotNo, isOverWgt = "" });
-
-                led_controler.setStaticLineMsgOut(PbCache.sportInfo.ledIp, "关闭远光灯,上秤计量");
-
-
-                RESTfulResult<string> rms = monitor.doUpdateWf(new MeterWorkMonitor
-                {
-                    pointNo = PbCache.sportInfo.baseSpotNo,
-                    validWgt = "1",
-                    validCarno = "1",
-                    validIsPre = "0",
-                    validTareTime = "1",
-                    validMatTime = "1",
-                    validTimeInterval = "1",
-                    validParkStatus = "1",
-                    validExceedWgt = "1",
-                    validPredictionDiff = "1",
-                    validLianda = "1",
-                    validMatClick = "1",
-                    setCar = "",
-                    rfidCar = "",
-                    photoCar = "",
-                    scanCar = "",
-                    editCar = "",
-                    zeroState = "0",
-                    carErr = "0",
-                    wgtErr = "0",
-                    stopOverTime = "0",
-                    msgInfo = "",
-                    isOverWgt = "",
-                    isHelp = "0",
-                    wgt = 0
-                });
-
-                // 重置局部变量
-                firstWgt = 0;
-                bRailwayActual = true;
-                isVoiceDownCar = false;//车上人员请下车播放一次
-                firstCode = "";//上次扫码编号
-                TrackCarNo = "";//预报车号
-                sPreCarNo = "";//摄像头识别车号
-                limsMsg = "";
-                wgt = 0;
-                temporaryResult = "";
-                temporaryCarNo = "";
-
-                // 清空Message控件
-                setMsg("");
-                // 清空显示区
-                ucWeightCarTJXJG1.setWeightType(" ");
-                ucCarMeterInfoJisco1.setFormControlValue(new MeterWorkCarActualFirst() { });
-
-
-                // 重置PbCache变量
-                PbCache.isLockFrm = false;  // 清除页面锁定
-                PbCache.lockCarNo = "";
-                PbCache.lockWgt = 0;
-                PbCache.ResultMessage = "";
-                PbCache.voiceType = 0;  // 清除语音
-                PbCache.tempImgId = ""; // 清除临时抓图ID
-                PbCache.shotSuccess = false;  // 清除拍照成功标识
-                btnSave.Enabled = true;
-                btnSelPreType.Visible = false;
-
-            }
-            catch (Exception ex)
-            {
-                lg.WriteLog(0, "frmCarSalePurchase_FormClosing异常:下秤关闭界面异常!异常信息:" + ex);
-            }
-
-            #endregion 清理一次监控表的几个数值,防止上车速度过快导致提示称重完成
-        }
-
-        /// <summary>
-        /// 修改监控表验证状态
-        /// </summary>
-        public void Monitor(rtInfo rt)
-        {
-            MeterWorkMonitor meterWorkMonitor = new MeterWorkMonitor();
-            meterWorkMonitor.pointNo = PbCache.sportInfo.baseSpotNo;
-            RESTfulResult<string> rms = null;
-            if (rt.isWarn)
-            {
-                if (rt.WarnContent == "validIsPre")
-                {
-                    meterWorkMonitor.validIsPre = "1";
-                }
-                if (rt.WarnContent == "validWgt")
-                {
-                    meterWorkMonitor.wgtErr = "1";
-                }
-                if (rt.WarnContent == "carErr")
-                {
-                    meterWorkMonitor.carErr = "1";
-                }
-                rms = monitor.doUpdateWf(meterWorkMonitor);
-            }
-            if (rt.isHelp)
-            {
-                meterWorkMonitor.isHelp = "1";
-                rms = monitor.doUpdateWf(meterWorkMonitor);
-            }
-            if (rms == null)
-            {
-                return;
-            }
-            if (!rms.Succeed)
-            {
-                lg.WriteLog(3, PbCache.lockCarNo + "求助写入失败");
-            }
-        }
-
-        public void setPre(MeterWorkCarActualFirst model)
-        {
-            PbCache.isPre = true;
-            ucCarMeterInfoJisco1.setFormControlValue(model);
-        }
-
-        public void readVoicd()
-        {
-            string voiceContent = "";
-
-            switch (PbCache.voiceType)
-            {
-                case 1:
-                    voiceContent = "计量完成,请离开秤台";
-                    break;
-                case 2:
-                    voiceContent = "计量失败,称重类型选择错误,请联系计量大厅";
-                    break;
-                case 3:
-                    voiceContent = "计量失败,存在多条未洁净数据,请联系计量大厅";
-                    break;
-                case 4:
-                    voiceContent = "计量失败,洁净重量过小,请联系计量大厅";
-                    break;
-                case 5:
-                    voiceContent = "计量失败,皮重超差,请联系计量大厅";
-                    break;
-                case 6:
-                    voiceContent = "计量失败,委托选择异常,请联系计量大厅";
-                    break;
-                case 7:
-                    voiceContent = "计量失败,无计量委托,请联系计量大厅";
-                    break;
-                case 8:
-                    voiceContent = "计量完成,存在多个计量委托,无法匹配,请联系计量大厅";
-                    break;
-                case 9:
-                    voiceContent = "计量完成,留存期限皮成功";
-                    break;
-                case 10:
-                    voiceContent = "计量完成,无计量委托,请联系计量大厅";
-                    break;
-                case 11:
-                    voiceContent = "计量完成,之前存在未结净毛重,请联系计量大厅";
-                    break;
-                case 12:
-                    voiceContent = "请在计量APP中确认重量并保存";
-                    break;
-                case 13:
-                    voiceContent = "计量失败,皮重超差,请联系计量大厅";//皮重验证
-                    break;
-                case 14:
-                    voiceContent = "计量失败,洁净重量过小,请联系计量大厅";//毛重验证
-                    break;
-                case 15:
-                    voiceContent = "计量完成,期限皮已过期,请留存期限皮";//计量完成,期限皮不存在或已过期,请留存期限皮
-                    break;
-                case 16:
-                    voiceContent = "计量完成,请离开秤台";//计量完成,期限皮结净
-                    break;
-                case 17:
-                    voiceContent = "计量完成,之前存在未结净毛重,请联系计量大厅";//期限皮过期,之前存在一个未结净的毛重
-                    break;
-                case 18:
-                    voiceContent = "计量完成,委托匹配异常,请联系计量大厅";//不存在一次计量数据却存在一条使用中的委托
-                    break;
-                case 19:
-                    voiceContent = "计量失败,委托选择异常,请联系计量大厅";//存在多条已选择的委托,请联系计量大厅
-                    break;
-                case 20:
-                    voiceContent = "计量失败,称重类型选择错误,请联系计量大厅";//存在多条上称申请数据,请联系计量大厅
-                    break;
-                case 21:
-                    voiceContent = "计量失败,未选择称重类型";//未选择称重类型,请选择后开始计量
-                    break;
-                case 22:
-                    voiceContent = "车辆在黑名单中";//未选择称重类型,请选择后开始计量
-                    break;
-                case 23:
-                    voiceContent = "毛重接近历史皮重";//未选择称重类型,请选择后开始计量计量成功,存在多条未结净一次数据,请联系计量大厅
-                    break;
-                case 24:
-                    voiceContent = "计量成功,存在多条未结净一次数据,请联系计量大厅";//计量成功,存在多条未结净一次数据,请联系计量大厅
-                    break;
-                case 25:
-                    voiceContent = "称重数据保存失败";//计量成功,存在多条未结净一次数据,请联系计量大厅
-                    break;
-                case 26:
-                    voiceContent = "毛重选择成皮重";//计量成功,存在多条未结净一次数据,请联系计量大厅
-                    break;
-                default:
-                    voiceContent = "程序处理异常";
-                    break;
-            }
-
-            if (PbCache.collect.weight > 500 && PbCache.voiceType != 0)
-            {
-                vicPlayClass.GetVoicePlay(voiceContent, PbCache.lockCarNo);
-            }
-        }
-
-        #region 清理对象数据
-        private void CleanObjectData()
-        {
-            PbCache.mwPreFirst.actualFirstNo = "";
-            PbCache.mwPreFirst.predictionNo = "";
-            PbCache.mwPreFirst.noticeNo = "";
-            PbCache.mwPreFirst.carNo = "";
-            PbCache.mwPreFirst.trailerNo = "";
-            PbCache.mwPreFirst.matterNo = "";
-            PbCache.mwPreFirst.matterName = "";
-            PbCache.mwPreFirst.contractNo = "";
-            PbCache.mwPreFirst.batchNo = "";
-            PbCache.mwPreFirst.customerSupplierNo = "";
-            PbCache.mwPreFirst.customerSupplierName = "";
-            PbCache.mwPreFirst.forwardingUnitNo = "";
-            PbCache.mwPreFirst.forwardingUnitName = "";
-            PbCache.mwPreFirst.receivingUintNo = "";
-            PbCache.mwPreFirst.receivingUintName = "";
-            PbCache.mwPreFirst.materialNo = "";
-            PbCache.mwPreFirst.materialName = "";
-            PbCache.mwPreFirst.specNo = "";
-            PbCache.mwPreFirst.specName = "";
-            PbCache.mwPreFirst.bindCardNo = "";
-            PbCache.mwPreFirst.loadPointNo = "";
-            PbCache.mwPreFirst.loadPointName = "";
-            PbCache.mwPreFirst.sampleNo = "";
-            PbCache.mwPreFirst.sampleVoucher = "";
-            PbCache.mwPreFirst.carrierUnitNo = "";
-            PbCache.mwPreFirst.carrierUnitName = "";
-            PbCache.mwPreFirst.predictionType = "";
-            PbCache.mwPreFirst.predictionCombination = "";
-            PbCache.mwPreFirst.meterTypeNo = "";
-            PbCache.mwPreFirst.meterTypeName = "";
-            PbCache.mwPreFirst.railwayNo = "";
-            PbCache.mwPreFirst.meterProcessNo = "";
-            PbCache.mwPreFirst.meterProcessEditionNo = "";
-            PbCache.mwPreFirst.weightType = "";
-            PbCache.mwPreFirst.createManNo = "";
-            PbCache.mwPreFirst.createManName = "";
-            PbCache.mwPreFirst.baseSpotNo = "";
-            PbCache.mwPreFirst.baseSpotName = "";
-            PbCache.mwPreFirst.meterClass = "";
-            PbCache.mwPreFirst.meterGroup = "";
-            PbCache.mwPreFirst.memo = "";
-            PbCache.mwPreFirst.valueFlag = "";
-            PbCache.mwPreFirst.updateManNo = "";
-            PbCache.mwPreFirst.updateManName = "";
-            PbCache.mwPreFirst.checkFlag = "";
-            PbCache.mwPreFirst.checkManNo = "";
-            PbCache.mwPreFirst.checkManName = "";
-            PbCache.mwPreFirst.meterMode = "";
-            PbCache.mwPreFirst.meterReasonNo = "";
-            PbCache.mwPreFirst.meterReasonName = "";
-            PbCache.mwPreFirst.addWgtNo = "";
-            PbCache.mwPreFirst.addWgtPk = "";
-            PbCache.mwPreFirst.limsSamplingFlag = "";
-            PbCache.mwPreFirst.heatNo = "";
-            PbCache.mwPreFirst.meterPierNo = "";
-            PbCache.mwPreFirst.meterPierName = "";
-            PbCache.mwPreFirst.shipNo = "";
-            PbCache.mwPreFirst.disOpr = "";
-            PbCache.mwPreFirst.printManNo = "";
-            PbCache.mwPreFirst.printManName = "";
-            PbCache.mwPreFirst.holddockSeq = "";
-            PbCache.mwPreFirst.scaleTypeNoM = "";
-            PbCache.mwPreFirst.scaleTypeNameM = "";
-            PbCache.mwPreFirst.scaleTypeNoD = "";
-            PbCache.mwPreFirst.scaleTypeNameD = "";
-            PbCache.mwPreFirst.driverName = "";
-            PbCache.mwPreFirst.telNum = "";
-            PbCache.mwPreFirst.idNum = "";
-            PbCache.mwPreFirst.dataSource = "";
-            PbCache.mwPreFirst.note = "";
-            PbCache.mwPreFirst.isPreScale = "";
-
-            PbCache.mwPreFirst.voucherIdentity = "";
-            PbCache.mwPreFirst.voucherItem = "";
-            PbCache.mwPreFirst.businessGroup = "";
-            PbCache.mwPreFirst.tempConveyance = "";
-            PbCache.mwPreFirst.conveyanceType = "";
-            PbCache.mwPreFirst.resourceSystem = "";
-            PbCache.mwPreFirst.groupPackageUnit = "";
-            PbCache.mwPreFirst.packageUnit = "";
-            PbCache.mwPreFirst.measureBatch = "";
-            PbCache.mwPreFirst.senderType = "";
-            PbCache.mwPreFirst.senderRemark = "";
-            PbCache.mwPreFirst.receiverType = "";
-            PbCache.mwPreFirst.receiverRemark = "";
-            PbCache.mwPreFirst.amountUnit = "";
-            PbCache.mwPreFirst.measureObjectType = "";
-            PbCache.mwPreFirst.measureTaskNum = "";
-
-            PbCache.mwPreFirst.shipmentGrossWeight = null;
-            PbCache.mwPreFirst.shipmentNetWeight = null;
-            PbCache.mwPreFirst.shipmentNum = null;
-            PbCache.mwPreFirst.meterWeight = null;
-            PbCache.mwPreFirst.addWeight = null;
-            PbCache.mwPreFirst.meterNum = null;
-            PbCache.mwPreFirst.createTime = null;
-            PbCache.mwPreFirst.updateTime = null;
-            PbCache.mwPreFirst.checkTime = null;
-            PbCache.mwPreFirst.loadEndTime = null;
-            PbCache.mwPreFirst.pageNum = 1;
-            PbCache.mwPreFirst.pageSize = 20;
-            PbCache.mwPreFirst.disWgt = null;
-            PbCache.mwPreFirst.disRatio = null;
-            PbCache.mwPreFirst.disTime = null;
-            PbCache.mwPreFirst.netEnd = null;
-            PbCache.mwPreFirst.shipmentTareWeight = null;
-            PbCache.mwPreFirst.printTime = null;
-            PbCache.mwPreFirst.printNum = null;
-
-            PbCache.mwPreFirst.groupPackageAmount = null;
-            PbCache.mwPreFirst.packageAmount = null;
-            PbCache.mwPreFirst.theoryAmount = null;
-            PbCache.mwPreFirst.measureBatchCount = null;
-
-        }
-        #endregion
-
-        private void btnSelPreType_Click(object sender, EventArgs e)
-        {
-            if (PbCache.collect != null && !string.IsNullOrEmpty(PbCache.collect.carno))
-            {
-                new frmMatMsgInfo(PbCache.collect.carno).Show();
-                PbCache.isSelFrmMat = true;
-            }
-            else
-            {
-                MessageBox.Show("车号为空");
-            }
-        }
-        #region 刷新刷新站点状态信息线程
-        //rxh add
-        private Thread thRefreshData;//刷新刷新站点状态信息线程
-        private int refreshDataInterval;
-        private void RefreshDataInTime()
-        {
-            while (InRuning)
-            {
-                try
-                {
-                    DualWeight();
-                    refreshDataInterval = 1000;
-                }
-                catch (Exception ee)
-                {
-                    //GlobalInstanceController.Instance.LastCallMessage = ee.Message;
-                    refreshDataInterval = 1000;
-                }
-                Thread.Sleep(refreshDataInterval);
-            }
-        }
-        private void StopRefreshData()
-        {
-            if (thRefreshData != null)
-            {
-                thRefreshData.Abort();
-                thRefreshData = null;
-            }
-        }
-        private void StartRefreshData(int interval)
-        {
-            refreshDataInterval = (interval == 0 ? 1000 : interval);
-      StopRefreshData();
-      if (thRefreshData == null)
-            {              
-                thRefreshData = new Thread(RefreshDataInTime);   
-            }
-            InRuning = true;
-            thRefreshData.Start();
-
-        }
-        #endregion 刷新刷新站点状态信息线程
-        #region 消息
-        //rxh add
-        public delegate void HandleMessageDelegate(object sender, object args);
-        public event HandleMessageDelegate NewMessageArrived;
-
-        private bool inRuning;
-        public bool InRuning
-        {
-            get { return this.inRuning; }
-            set
-            {
-                this.inRuning = value;
-                this.SafeInvokeMessagedEvent(NewMessageArrived, this.inRuning);
-            }
-        }
-
-        private void SafeInvokeMessagedEvent(HandleMessageDelegate eventName, object args)
-        {
-            if (eventName != null)
-            {
-                HandleMessageDelegate mh = null;
-
-                foreach (Delegate del in eventName.GetInvocationList())
-                {
-                    try
-                    {
-                        mh = (HandleMessageDelegate)del;
-                        mh(this, args);
-                    }
-                    catch (Exception e)
-                    {
-                        lg.WriteLog(13,"线程错误");
-                        //NewMessageArrived -= mh;
-                    }
-                }
-            }
-        }
-        /// <summary>
-        /// 任务栏显示消息事件
-        /// </summary>
-        private void OnMessageArrived(object sender, object args)
-        {
-            if (this.InvokeRequired)
-                this.Invoke(new HandleMessageDelegate(this.OnMessageArrived), new object[] { sender, args });
-            else
-            {
-                if (args.ToString().Equals("False"))
-                {
-                    //Thread.Sleep(1000);//不能用,会和close冲突
-                    //this.Close();
-
-                    try
-                    {                      
-                        this.hidWindow();
-                        this.Hide();
-                        //this.StopRefreshData();
-                    }
-                    catch (Exception ee)
-                    {
-                        lg.WriteLog(13, "页面关闭事件exp:"+ee.Message.ToString());
-                    }
-
-                }
-            }
-        }
-        #endregion 消息
-
-        private void frmOneYardToEnd_VisibleChanged(object sender, EventArgs e)
-        {
-            if (this.Visible == false)
-
-            {
-                //Thread.Sleep(1000);
-                //this.StopRefreshData();
-            }
-        }
-    }
-}