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.
68 lines
1.9 KiB
68 lines
1.9 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Data;
|
|
using QMFrameWork.Data;
|
|
using QMAPP.Entity;
|
|
using QMAPP.FJC.Entity.Operation;
|
|
using QMAPP.FJC.Entity.ProduceManage;
|
|
using QMAPP.DAL;
|
|
using QMFrameWork.Log;
|
|
using QMAPP.FJC.Entity.Stocktaking;
|
|
|
|
namespace QMAPP.FJC.DAL.Operation
|
|
{
|
|
/// <summary>
|
|
/// 模块名称:Bom详细信息
|
|
/// 作 者:张松男
|
|
/// 编写日期:2021年03月17日
|
|
/// </summary>
|
|
public class PbomItemDAL : BaseDAL
|
|
{
|
|
|
|
/// <summary>
|
|
/// 获取全部规则
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public List<PbomItem> Get(string MATERIAL_CODE)
|
|
{
|
|
try
|
|
{
|
|
string sql = $"SELECT * FROM [T_MD_PBOM_ITEM] where MATERIAL_CODE = '{MATERIAL_CODE}'";
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
return session.GetList<PbomItem>(sql, parameters.ToArray()).ToList();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 获取全部规则
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
public Bom GetBom(string PbomCode)
|
|
{
|
|
try
|
|
{
|
|
string sql = $"SELECT PID,PBOM_CODE,MATERIAL_CODE FROM [T_MD_PBOM] where PBOM_CODE = '{PbomCode}'";
|
|
List<DataParameter> parameters = new List<DataParameter>();
|
|
using (IDataSession session = AppDataFactory.CreateMainSession())
|
|
{
|
|
return session.Get<Bom>(sql, parameters.ToArray());
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
throw ex;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|