You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using System; using System.Collections; using System.Collections.Generic; using ICSSoft.Frame.Data.Entity; using System.Linq; using System.Data.Linq; using System.Xml.Linq; using ICSSoft.Base.Config.AppConfig; using ICSSoft.Frame.DataCollect;
namespace ICSSoft.Frame.DataConnect.Action { /// <summary>
/// ���������ɼ�
/// </summary>
public class ActionGood : IActionWithStatus { private FramDataContext _domainDataProvider = null;
// public ActionGood()
// {
// }
public ActionGood(FramDataContext domainDataProvider) { this._domainDataProvider = domainDataProvider; }
public FramDataContext DataProvider { get { return _domainDataProvider; } }
public Messages Execute(ActionEventArgs actionEventArgs) { Messages messages = new Messages(); Messages msgAutoGoMO = new Messages(); try { // �����Զ���������
//ActionGoToMO actionGoToMO = new ActionGoToMO(this.DataProvider);
//msgAutoGoMO = actionGoToMO.AutoGoMO(actionEventArgs);
// Added end
ActionOnLineHelper dataCollect = new ActionOnLineHelper(this.DataProvider); //��дSIMULATION ���鹤����ID��;�̡�����
messages.AddMessages(dataCollect.CheckID(actionEventArgs)); if (messages.IsSuccess()) { //���� �깤����������Check��ͨ���������£����е�RunningCardӦ����GOOD״̬
//��ʱ�����������
DataCollectFacade dataCollectFacade = new DataCollectFacade(this.DataProvider); if (actionEventArgs.ProductInfo.NowSimulation.ROUTECODE != "" && dataCollectFacade.OPIsMORouteLastOP( actionEventArgs.ProductInfo.NowSimulation.MOCODE , actionEventArgs.ProductInfo.NowSimulation.ROUTECODE , actionEventArgs.ProductInfo.NowSimulation.OPCODE)) { actionEventArgs.ProductInfo.NowSimulation.ISCOM = "1"; actionEventArgs.ProductInfo.NowSimulation.EATTRIBUTE1 = "GOOD";
// dataCollectFacade.DeductMaterialQty(actionEventArgs);
} messages.AddMessages(dataCollect.Execute(actionEventArgs)); if (messages.IsSuccess()) { //��д���Ա��� TODO
ReportHelper reportCollect = new ReportHelper(this.DataProvider); //messages.AddMessages(reportCollect.ReportLineQuanMaster(this.DataProvider, actionEventArgs.ActionType, actionEventArgs.ProductInfo));
//messages.AddMessages(reportCollect.ReportResQuanMaster(this.DataProvider, actionEventArgs.ActionType, actionEventArgs.ProductInfo));
} } } catch (Exception e) { messages.Add(new Message(e)); }
if (msgAutoGoMO.Count() < 1 || (msgAutoGoMO.IsSuccess() == true && messages.IsSuccess() == false)) return messages; else { msgAutoGoMO.IgnoreError(); msgAutoGoMO.AddMessages(messages); return msgAutoGoMO; } }
public Messages Execute(ActionEventArgs actionEventArgs, ActionCheckStatus actionCheckStatus) { Messages messages = new Messages(); Messages msgAutoGoMO = new Messages(); try { // Added end
ActionOnLineHelper dataCollect = new ActionOnLineHelper(this.DataProvider); //��дSIMULATION ���鹤����ID��;�̡�����
messages.AddMessages(dataCollect.CheckID(actionEventArgs, actionCheckStatus));
if (messages.IsSuccess()) { //���� �깤����������Check��ͨ���������£����е�RunningCardӦ����GOOD״̬
//��ʱ�����������
DataCollectFacade dataCollectFacade = new DataCollectFacade(this.DataProvider); if (actionEventArgs.ProductInfo.NowSimulation.ROUTECODE != "" && dataCollectFacade.OPIsMORouteLastOP( actionEventArgs.ProductInfo.NowSimulation.MOCODE , actionEventArgs.ProductInfo.NowSimulation.ROUTECODE , actionEventArgs.ProductInfo.NowSimulation.OPCODE)) { actionEventArgs.ProductInfo.NowSimulation.ISCOM = "1"; actionEventArgs.ProductInfo.NowSimulation.EATTRIBUTE1 = "GOOD";
}
if (actionCheckStatus.NeedUpdateSimulation == true) { messages.AddMessages(dataCollect.Execute(actionEventArgs)); } else { messages.AddMessages(dataCollect.Execute(actionEventArgs, actionCheckStatus)); } if (messages.IsSuccess()) { // �Զ������ͼ���
if (messages.IsSuccess()) { //��д���Ա��� TODO
if (actionCheckStatus.NeedFillReport == true) { ReportHelper reportCollect = new ReportHelper(this.DataProvider); messages.AddMessages(reportCollect.ReportLineQuanMaster(this.DataProvider, actionEventArgs.ActionType, actionEventArgs.ProductInfo, actionCheckStatus));
}
//��Action�����б�
actionCheckStatus.ActionList.Add(actionEventArgs); } } } else { throw new Exception(messages.ToString()); } } catch (Exception e) { messages.Add(new Message(e)); } if (msgAutoGoMO.Count() < 1 || (msgAutoGoMO.IsSuccess() == true && messages.IsSuccess() == false)) return messages; else { msgAutoGoMO.IgnoreError(); msgAutoGoMO.AddMessages(messages); return msgAutoGoMO; } }
} }
|