天津投入产出系统后端
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.
 
 
 
 
 
 

599 lines
14 KiB

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