using System;
using System.Collections.Generic;
using QMAPP.BLL;
using QMAPP.Entity;
using QMAPP.FJC.BLL.Dict;
using QMAPP.FJC.DAL.ProduceManage;
using QMAPP.FJC.Entity.ProduceManage;
using QMFrameWork.Data;
using QMFrameWork.Log;
using QMAPP.FJC.Entity;
using System.Data;
using Model;
using QMAPP.FJC.Entity.Operation;
using QMAPP.FJC.DAL.Operation;
namespace QMAPP.FJC.BLL.FrmPlace
{
///
/// 模块编号:M4-1
/// 作 用:发运模块
/// 作 者:崔法宝
/// 编写日期:2017年09月05日
///
public class FrmPlaceBLL : BaseBLL
{
#region 获取列表
///
/// 获得Fis发货队列信息
///
///
///
public DataTable GetList(string pFisType,string WORKCENTER_CODE)
{
#region
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetList(pFisType, WORKCENTER_CODE);
}
catch (Exception ex)
{
throw ex;
}
#endregion
}
#endregion
///
/// 贴车单记录查询
///
///
///
///
///
///
public DataTable GetPastecardInfoWithVin(string ppastercardno, string strbegindate, string strenddate, string vinLack, string PlantCode, string Operator)
{
#region
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetPastecardInfoWithVin(ppastercardno, strbegindate, strenddate, vinLack, PlantCode, Operator);
}
catch (Exception ex)
{
throw ex;
}
#endregion
}
///
/// 根据贴车单主键查询贴车单明细
///
///
///
public DataTable GetPasteDetails(string ppastercarKey)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetPasteDetails(ppastercarKey);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 实现校准功能
///
///
public void UpdateFisOrder(string strvwseq, string strCP5A,string workcenter)
{
try
{
new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().UpdateFisOrder(strvwseq, strCP5A, workcenter);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取贴车单当天的总条数
///
///
public DataTable GetPastecardNo(string strcreatetime)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetPastecardNo(strcreatetime);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取发车信息
///
///
public DataTable GetPastecardIndex(string PLANTNAME, string PASTECARDNO)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetPastecardIndex(PLANTNAME, PASTECARDNO);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 添加贴车单
///
///
///
public int AddPasteCard(EPasteCard ppastecard)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().AddPasteCard(ppastecard);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 更新贴车单信息
///
///
///
public int UpdatePastecardIndex(string UpdatePastecardIndex,string Plantname)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().UpdatePastecardIndex(UpdatePastecardIndex, System.DateTime.Now, Plantname);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 更新补打时间
///
///
///
///
///
public int UpdatePasteCardPasteCardDate2Value(string PASTECARDNO, string PasteCarddate2, string OPERATOR)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().UpdatePasteCardPasteCardDate2Value(PASTECARDNO, PasteCarddate2, OPERATOR);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取下护板扫描表其他条码号
///
///
///
public DataTable GetOhterCode(string code)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetOhterCode(code);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取配置表中的规则类型值
///
///
///
public DataTable GetRule(string cartype, string nf)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetRule(cartype, nf);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 根据条码标识查询零件信息
///
///
///
public DataTable GetSparepartsinfo(string strbarcode)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetSparepartsinfo(strbarcode);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 判断条码是否重复
///
///
///
public DataTable ExistBarcode(int barcodetime, string pbarcode)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().ExistBarcode(barcodetime, pbarcode);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 打印条码
///
///
///
public DataTable WriteFile(string sql)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().WriteFile(sql);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 更新贴车单补打印时间
///
///
public void UpdataBarcodeDate(string pastecardno)
{
try
{
new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().UpdataBarcodeDate(pastecardno);
}
catch (Exception ex)
{
throw ex;
}
}
public void InsertLog(EFailLog plog)
{
try
{
new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().InsertLog(plog);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取扫取条形码是否存在
///
///
///
public int GetExitsCode(string code)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetExitsCode(code);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 查询是否为成品
///
///
///
public object GetExitsStatus(string code)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetExitsStatus(code);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 添加贴车单
///
///
///
///
public int AddNewPasteCard(EPasteCard ppastecard)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().AddNewPasteCard(ppastecard);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取工作中心
///
///
///
public DataTable GetWORKCENTERCODE()
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetWORKCENTERCODE();
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取 DASPASTECARDINDEX表数据
///
///
///
public DataTable GetDaspssteCarIndexByPlanName(string PlanTName)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetDaspssteCarIndexByPlanName(PlanTName);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 插入 DASPASTECARDINDEX表数据
///
///
///
public int InsertDaspssteCarIndexByPlanName(EPasteCard ppastecard)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().InsertDaspssteCarIndexByPlanName(ppastecard);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// GetPastecardDeatis
///
///
///
public DataTable GetPastecardDeatis()
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetPastecardDeatis();
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 根据贴车单ID获取详细
///
///
///
public DataTable GetPascardDetailsByPid(string ppastercarKey)
{
try
{
return new QMAPP.FJC.DAL.FrmPlace.FrmPlaceDAL().GetPascardDetailsByPid(ppastercarKey);
}
catch (Exception ex)
{
throw ex;
}
}
public Product GetProductForSend(string code)
{
try
{
return new ProductDAL().GetProductInfo(new Product() { PRODUCTCODE = code });
//return new Product();
}
catch (Exception ex)
{
throw ex;
}
}
public Product GetProductByAssembleCode(string code)
{
try
{
return new ProductDAL().GetProductByAssembleCode(code);
}
catch (Exception ex)
{
throw ex;
}
}
public QMAPP.FJC.Entity.SendManage.PastCard GetLastPastCard(string workcentercode)
{
try
{
return new DAL.SendManage.SendPlanRecordDAL().GetLastPastCard(workcentercode);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获得超时时间信息信息(列表)
///
///
///
///
public DataTable GetTimeOutSet()
{
#region
try
{
#region
try
{
return new DAL.FrmPlace.FrmPlaceDAL().GetLastPastCard();
}
catch (Exception ex)
{
throw ex;
}
#endregion
}
catch (System.Exception ex)
{
throw ex;
}
#endregion
}
}
}