using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using QMFrameWork.Data;
using QMAPP.FJC.DAL.QT;
using QMAPP.FJC.Entity.QT;
using QMAPP.FJC.Entity.Produce;
using QMAPP.FJC.TRACING.DAInterface;
using QMAPP.FJC.DAL.Produce;
using QMAPP.FJC.DAL.Basic;
namespace QMAPP.FJC.TRACING.StateActions
{
///
/// 重置当前状态数据
///
public class ResetInState:IStateAction
{
///
/// 执行
///
///
public void Execute(DAObject data)
{
//List resetDai = new List();
foreach (var dai in data.WorkLocState.DataCache)
{
if (string.Equals(dai.STATE_CODE,data.WorkLocState.CurrentState.STATE_CODE)) //只重置当前工序状态下得采集点
{
dai.MATERIAL_CODE = "";
dai.DA_VALUE = "";
dai.SAVED = dai.SAVED.Replace(data.MouldCode, ""); ;
data.AddToPersistentList(dai, dai.PID);
//resetDai.Add(dai);
}
}
//DAICacheDAL dcdal = new DAICacheDAL();
//dcdal.Update(resetDai, data.DataSession);
}
}
}