锐腾搅拌上料功能
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.

563 lines
15 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ICSSoft.Frame.Data.DAL;
using ICSSoft.Frame.Data.Entity;
using System.Data;
namespace ICSSoft.Frame.Data.BLL
{
public class ICSWareHouseLotInfoLogBLL
{
public static void towh(FormICSWareHouseLotInfoUIModel shiftInfo, string dsconn)
{
try
{
if (string.IsNullOrWhiteSpace(dsconn))
{
throw new Exception("请输入......");
}
List<FormICSWareHouseLotInfoUIModel> shiftInfoList = new List<FormICSWareHouseLotInfoUIModel>() { shiftInfo };
ICSWareHouseLotInfoLogDAL.towh(shiftInfoList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#region 送检单子表
public static void iqcdetail(ICSASNIQCDETAIL ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.iqcdetail(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 物料,产品详细信息
public static void iqcdetail(ICSITEMLotDetail ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.itemlotdetail(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 库存信息表表
public static void WareHouseInfo(ICSWareHouseInfo ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.WareHouseInfo(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 物料收发交易记录表
public static void trans(ICSITEMTrans ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.trans(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 物料收发交易批号记录表
public static void transLOT(ICSITEMTransLot ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.transLOT(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 物料收发交易详细记录表
public static void transLOTDetail(ICSITEMTransLotDetail ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.transLOTDetail(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 送检单主表
public static void asniqc(ICSASNIQC ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.asniqc(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 到货单主表
public static void invreceipt(ICSINVReceipt ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.invreceipt(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 到货单详细表
public static void Receiptdetail(ICSINVReceiptDetail ItemLot, string Appconstr)
{
try
{
ICSWareHouseLotInfoLogDAL.receiptdetail(ItemLot, Appconstr);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 查询库位信息
public static DataTable SearchStackInfoList(string storageid, string dsconn)
{
try
{
DataTable returndt = new DataTable();
//returndt.Columns.Add("Serial", typeof(string));
returndt.Columns.Add("库位代码", typeof(string));
returndt.Columns.Add("库位名称", typeof(string));
List<FormICSStackUIModel> returndal = ICSWareHouseLotInfoLogDAL.SearchStackInfoList(storageid,dsconn);
foreach (FormICSStackUIModel returntype in returndal)
{
DataRow dr = returndt.NewRow();
//dr["Serial"] = returntype.Serial;
dr["库位代码"] = returntype.StackCode;
dr["库位名称"] = returntype.StackName;
returndt.Rows.Add(dr);
}
return returndt;
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据入库单号、入库单行查询物料批号
public static DataTable SelectLotNO(string no, int line)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectLotNO(no, line);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据库房代码查询库房id
public static DataTable SelectStorageID(string storagecode)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectStorageID(storagecode);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据库位代码查询库位id
public static DataTable SelectStsckID(string stackcode)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectStackID(stackcode);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据物料代码查询物料id
public static DataTable SelectItemID(string itemcode)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectItemID(itemcode);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据单号、单行号查询物料收发交易记录表id
public static DataTable SelectTransID(string transno, int transline)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectTransID(transno, transline);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据批号查找交易批号记录表id
public static DataTable SelectTransLotID(string lotNO)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectTransLotID(lotNO);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据批号查找产品序列号
public static DataTable SelectSeriaNO(string lotNO)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectSeriaNO(lotNO);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据批号查找原始批次数量
public static DataTable SelectLOTQTY(string lotNO)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectLOTQTY(lotNO);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新送检单子表行状态
public static void updateSTDSTATUS(string stno, int stline)
{
try
{
ICSWareHouseLotInfoLogDAL.updateSTDSTATUS(stno, stline);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新物料,产品详细信息产品状态
public static void updateSerialStatus(string serialno, string itemcode)
{
try
{
ICSWareHouseLotInfoLogDAL.updateSerialStatus(serialno, itemcode);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新送检单状态
public static void updateSTATUS(string stno,int stline)
{
try
{
ICSWareHouseLotInfoLogDAL.updateSTATUS(stno,stline);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新到货单详细表更新到货单状态
public static void updateRECSTATUS(string stno, int stline)
{
try
{
ICSWareHouseLotInfoLogDAL.updateRECSTATUS(stno, stline);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 更新到货单主表单据状态
public static void updatereceiptRECSTATUS(string stno)
{
try
{
ICSWareHouseLotInfoLogDAL.updatereceiptRECSTATUS(stno);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据单号单行号查询送检单子表信息
public static ICSASNIQCDETAIL selectIQCDetail(String stno, int stline, String Appconstr)
{
return ICSWareHouseLotInfoLogDAL.selectIQCDetail(stno, stline,Appconstr);
}
#endregion
#region 根据产品序列号、存货编码查询物料产品详细表
public static ICSITEMLotDetail selectitemlotdetail(String serailno, string itemcode, String Appconstr)
{
return ICSWareHouseLotInfoLogDAL.selectitemlotdetail(serailno, itemcode, Appconstr);
}
#endregion
#region 根据单号、单行号查询送检单主表信息
public static ICSASNIQC selectASNIQC(String stno,int stline, String Appconstr)
{
return ICSWareHouseLotInfoLogDAL.selectASNIQC(stno, stline, Appconstr);
}
#endregion
#region 根据单号查询到货单主表信息
public static ICSINVReceipt selectreceipt(String stno, String Appconstr)
{
return ICSWareHouseLotInfoLogDAL.selectreceipt(stno, Appconstr);
}
#endregion
#region 根据单号单行号查询送到货单详细表信息
public static ICSINVReceiptDetail selectReceiptDetail(String stno, int stline, String Appconstr)
{
return ICSWareHouseLotInfoLogDAL.selectReceiptDetail(stno, stline, Appconstr);
}
#endregion
#region 根据单号、单行号查询生成的批次信息
public static ICSITEMLot selectICSITEMLot(String stno, string stline, String Appconstr)
{
return ICSWareHouseLotInfoLogDAL.selectICSITEMLot(stno, stline, Appconstr);
}
#endregion
#region 根据库房库位id、库位id、物料id查询库存信息表中的库存数量
public static DataTable SelectQTY(string storageid, string stackid, string itemid)
{
return ICSWareHouseLotInfoLogDAL.SelectQTY(storageid, stackid, itemid);
}
#endregion
#region 判断某个送检单所有子表的行状态是否关闭
public static bool IsSTDSTATUSclose(string stno, string dsconn)
{
try
{
return ICSWareHouseLotInfoLogDAL.IsSTDSTATUSclose(stno, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 判断某个到货单所有子表的行状态是否关闭
public static bool IsRECSTATUSclose(string stno, string dsconn)
{
try
{
return ICSWareHouseLotInfoLogDAL.IsRECSTATUSclose(stno, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 状态更新
public static void updatestatus(string receiptno, int receiptline)
{
try
{
ICSWareHouseLotInfoLogDAL.updatestatus(receiptno, receiptline);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 期初导入
public static void Insert(List<ICSITEMLot> tbinfoList, List<FormICSWareHouseLotInfoUIModel> shiftInfoList, List<ICSWareHouseInfo> WareHouseInfoList,List<ICSWareHouseLotInfoLog> ICSWareHouseLogList, string dsconn)
{
try
{
ICSWareHouseLotInfoLogDAL.Insert(tbinfoList, shiftInfoList, WareHouseInfoList, ICSWareHouseLogList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 审核ERP入库单
public static string updateRd10(List<Rdrecord10> dataContext, List<FormICSWareHouseLotInfoUIModel> shiftInfoList, List<ICSWareHouseInfo> WareHouseInfoList, List<ICSITEMTrans> TransList, List<ICSITEMTransLot> ItemLotList, string dsconn)
{
try
{
return ICSWareHouseLotInfoLogDAL.updateRd10(dataContext, shiftInfoList, WareHouseInfoList, TransList, ItemLotList, dsconn);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据库位代码查询库位id,仓库
public static DataTable SelectStack(string stackcode)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectStack(stackcode);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据存货编码判断批号是否批次管理
public static DataTable SelectLotNo(string stackcode)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectLotNo(stackcode);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region 根据物料代码查询物料
public static DataTable SelectItem(string itemcode)
{
try
{
return ICSWareHouseLotInfoLogDAL.SelectItem(itemcode);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
}
}