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.
41 lines
1.1 KiB
41 lines
1.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using QMAPP.FJC.TRACING.DAInterface;
|
|
using QMAPP.FJC.Entity.ProductionPlan;
|
|
|
|
namespace QMAPP.FJC.TRACING.StateActions
|
|
{
|
|
public class ReleaseOrder:IStateAction
|
|
{
|
|
|
|
public void Execute(DAObject data)
|
|
{
|
|
UpdateWorkOrder(data);
|
|
}
|
|
private void UpdateWorkOrder( DAObject data)
|
|
{
|
|
var workorder = LocateWorkOrder(data);
|
|
if (workorder != null)
|
|
{
|
|
workorder.WORKLOC_CODE = "";
|
|
workorder.STATE = 1;
|
|
data.AddToPersistentList(workorder, workorder.PID);
|
|
}
|
|
}
|
|
/// <summary>
|
|
/// 定位派工单
|
|
/// </summary>
|
|
private WorkOrder LocateWorkOrder( DAObject data)
|
|
{
|
|
DAL.ProductionPlan.WorkOrderDAL workorderdal = new DAL.ProductionPlan.WorkOrderDAL();
|
|
var order = workorderdal.GetWorkingOrderInLoc(data.WorkLocState.WORKLOC_CODE, data.MouldCode);
|
|
if (order == null)
|
|
{
|
|
|
|
}
|
|
return order;
|
|
}
|
|
}
|
|
}
|
|
|