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.DAL.Operation;
using QMAPP.FJC.Entity.Operation;
//using QMAPP.FJC.Entity.Operation;
//using QMAPP.FJC.DAL.Operation;
namespace QMAPP.FJC.BLL.TianJin
{
///
/// 模块编号:M4-1
/// 作 用:发运模块
/// 作 者:崔法宝
/// 编写日期:2017年09月05日
///
public class TJFrmPlaceBLL : BaseBLL
{
#region 获取列表
///
/// 获得Fis发货队列信息
///
///
///
public DataTable GetList(string pFisType,string WORKCENTER_CODE)
{
#region
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetList(pFisType, WORKCENTER_CODE);
}
catch (Exception ex)
{
throw ex;
}
#endregion
}
#endregion
#region 天津发运--计划挂起 state=4
public int UpdateWorkOrderState(List Ids)
{
try
{
var count = 0;
if (Ids.Count > 0)
{
return new FJC.DAL.TianJin.TJFrmPlaceDAL().UpdateWorkOrderState(Ids);
}
return count;
}
catch
{
return 0;
}
}
#endregion
///
/// 贴车单记录查询
///
///
///
///
///
///
public DataTable GetPastecardInfoWithVin(string ppastercardno, string strbegindate, string strenddate, string vinLack, string PlantCode, string Operator)
{
#region
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetPastecardInfoWithVin(ppastercardno, strbegindate, strenddate, vinLack, PlantCode, Operator);
}
catch (Exception ex)
{
throw ex;
}
#endregion
}
///
/// 根据贴车单主键查询贴车单明细
///
///
///
public DataTable GetPasteDetails(string ppastercarKey)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetPasteDetails(ppastercarKey);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 实现校准功能
///
///
public void UpdateFisOrder(string strvwseq, string strCP5A,string workcenter)
{
try
{
new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().UpdateFisOrder(strvwseq, strCP5A, workcenter);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取贴车单当天的总条数
///
///
public DataTable GetPastecardNo(string strcreatetime)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetPastecardNo(strcreatetime);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取发车信息
///
///
public DataTable GetPastecardIndex(string PLANTNAME, string PASTECARDNO)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetPastecardIndex(PLANTNAME, PASTECARDNO);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 添加贴车单 -- 计划外发运
///
///
///
public int AddPasteCard(EPasteCard ppastecard)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().AddPasteCard(ppastecard);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 更新贴车单信息
///
///
///
public int UpdatePastecardIndex(string UpdatePastecardIndex,string Plantname)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().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.TianJin.TJFrmPlaceDAL().UpdatePasteCardPasteCardDate2Value(PASTECARDNO, PasteCarddate2, OPERATOR);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取下护板扫描表其他条码号
///
///
///
public DataTable GetOhterCode(string code)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetOhterCode(code);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取配置表中的规则类型值
///
///
///
public DataTable GetRule(string cartype, string nf)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetRule(cartype, nf);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 根据条码标识查询零件信息
///
///
///
public DataTable GetSparepartsinfo(string strbarcode)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetSparepartsinfo(strbarcode);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 判断条码是否重复
///
///
///
public DataTable ExistBarcode(int barcodetime, string pbarcode)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().ExistBarcode(barcodetime, pbarcode);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 打印条码
///
///
///
public DataTable WriteFile(string sql)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().WriteFile(sql);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 更新贴车单补打印时间
///
///
public void UpdataBarcodeDate(string pastecardno)
{
try
{
new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().UpdataBarcodeDate(pastecardno);
}
catch (Exception ex)
{
throw ex;
}
}
public void InsertLog(EFailLog plog)
{
try
{
new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().InsertLog(plog);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取扫取条形码是否存在
///
///
///
public int GetExitsCode(string code)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetExitsCode(code);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 查询是否为成品
///
///
///
public object GetExitsStatus(string code)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetExitsStatus(code);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 添加贴车单
///
///
///
///
public int AddNewPasteCard(EPasteCard ppastecard,int Count)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().AddNewPasteCard(ppastecard,Count);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取工作中心
///
///
///
public DataTable GetWORKCENTERCODE()
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetWORKCENTERCODE();
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 获取 DASPASTECARDINDEX表数据
///
///
///
public DataTable GetDaspssteCarIndexByPlanName(string PlanTName)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetDaspssteCarIndexByPlanName(PlanTName);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 插入 DASPASTECARDINDEX表数据
///
///
///
public int InsertDaspssteCarIndexByPlanName(EPasteCard ppastecard)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().InsertDaspssteCarIndexByPlanName(ppastecard);
}
catch (Exception ex)
{
throw ex;
}
}
///
/// GetPastecardDeatis
///
///
///
public DataTable GetPastecardDeatis()
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().GetPastecardDeatis();
}
catch (Exception ex)
{
throw ex;
}
}
///
/// 根据贴车单ID获取详细
///
///
///
public DataTable GetPascardDetailsByPid(string ppastercarKey)
{
try
{
return new QMAPP.FJC.DAL.TianJin.TJFrmPlaceDAL().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;
// }
//}
///
/// 查询Code在Main表的记录
///
///
///
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.TianJin.TJFrmPlaceDAL().GetLastPastCard();
}
catch (Exception ex)
{
throw ex;
}
#endregion
}
catch (System.Exception ex)
{
throw ex;
}
#endregion
}
}
}