ldj/Model/wms/tables/WmsFlow.cs

154 lines
3.6 KiB
C#
Raw Normal View History

2023-05-23 16:13:17 +08:00

/// <summary>
///INTERFACE CLASS FOR TABLE t_wmsFlow
///By wm
///on 06/04/2020
/// </summary>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
namespace DeiNiu.wms.Data.Model
{
[Serializable]
public class WmsFlow : WmsFlow_base
{
private string taskNo;
public WmsFlow()
{
}
public WmsFlow(int id)
: base(id)
{
}
public WmsFlow(DataRow dr)
: base(dr)
{
}
/// <summary>
/// 一个流水号对应一托货物
///
///
/// </summary>
/// <param name="flowNo"></param>
/* public WmsFlow(string flowNo)
{
cmdParameters[0] = flowNo;
getModel(200);
} */
public WmsFlow(string taskNo, string orderNo)
{
cmdParameters[0] = taskNo;
cmdParameters[1] = orderNo;
getModel(250);
}
public WmsFlow(string taskNo)
{
cmdParameters[0] = taskNo;
getModel(260);
}
protected override void getImp()
{
model_imp = new WmsFlow_Imp();
}
public DataTable getByFlowNo4Wince(string flowNo)
{
cmdParameters[0] = flowNo;
return CustQuery(300).Tables[0];
}
/*
public static bool isFlowFree(string flowNo)
{
return new WmsFlow(flowNo).ID == 0;
}
public static string flowOrderNo(string flowNo)
{
return new WmsFlow(flowNo).orderNo;
}
*/
public static bool free(string flowNo)
{
return false;
// return new WmsFlow().deleteFlow(flowNo) > 0;
// return new WmsFlow(flowNo).Delete()>0;
}
private int deleteFlow(string flowNo)
{
cmdParameters[0] = flowNo;
return CustOper(400);
}
public static void done(string flowNo)
{
//to update status of job, and progress on task.
// throw new NotImplementedException();
}
public DataTable getTasks(int status, int partion, int emId,int days=1)
{
cmdParameters[0] = status;
cmdParameters[1] = partion;
cmdParameters[2] = emId;
cmdParameters[3] = days;
return CustQuery(500).Tables[0];
}
public DataTable getTaskDetail(string taskNo)
{
cmdParameters[0] = taskNo;
return CustQuery(600).Tables[0];
}
public DataTable getFlowDetail(string flowNo)
{
cmdParameters[0] = flowNo;
return CustQuery(700).Tables[0];
}
public DataTable getTaskInfo(string taskNo)
{
cmdParameters[0] = flowNo;
return CustQuery(800).Tables[0];
}
2023-09-04 22:41:19 +08:00
/* public int startTask(string taskNo, int operId)
2023-05-23 16:13:17 +08:00
{
cmdParameters[0] = taskNo;
cmdParameters[1] = operId;
return CustOper(900) ;
2023-09-04 22:41:19 +08:00
}*/
public int startTask(string orderNo, string flowNo)
{
cmdParameters[0] = orderNo;
cmdParameters[1] = flowNo;
return CustOper(1000);
2023-05-23 16:13:17 +08:00
}
public DataTable getTaskDetail4Wince(string taskNo)
{
cmdParameters[0] = taskNo;
return CustQuery(601).Tables[0];
}
2023-09-04 22:41:19 +08:00
public DataTable getTasks(string orderNo, string flowNo)
{
throw new NotImplementedException();
}
2023-05-23 16:13:17 +08:00
}
}