using HH.WMS.DAL.Algorithm;
|
using HH.WMS.DAL.Common;
|
using HH.WMS.Entitys;
|
using HH.WMS.Entitys.Algorithm;
|
using HH.WMS.Entitys.Basic;
|
using HH.WMS.Entitys.Common;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
|
namespace HH.WMS.BLL.Common
|
{
|
public class TN_WM_MONGOBLL : BaseBLL
|
{
|
#region 判断mongo中是否存在该条记录
|
/// <summary>
|
/// 判断mongo中是否存在该条记录
|
/// </summary>
|
/// <typeparam name="T"></typeparam>
|
/// <param name="fieldValue">字段值</param>
|
/// <param name="fieldName">字段名称</param>
|
/// <param name="collectionName">表名</param>
|
/// <returns></returns>
|
public OperateResult IsExistsMongo<T>(string fieldValue, string fieldName, string collectionName)
|
{
|
return CreateDAL<TN_WM_MONGODAL>().IsExistsMongo<T>(fieldValue, fieldName, collectionName);
|
}
|
#endregion
|
|
#region 新增一个集合到mongo数据库
|
/// <summary>
|
/// 新增一个集合到mongo数据库
|
/// </summary>
|
/// <typeparam name="T">实体类</typeparam>
|
/// <param name="lstEntity">实体类集合数据</param>
|
/// <param name="CollectionName">对象名称</param>
|
/// <returns></returns>
|
public OperateResult AddList<T>(List<T> lstEntity, string collectionName)
|
{
|
return CreateDAL<TN_WM_MONGODAL>().AddList<T>(lstEntity, collectionName);
|
}
|
#endregion
|
|
#region 根据仓库编码删除
|
/// <summary>
|
/// 根据仓库编码删除
|
/// </summary>
|
/// <typeparam name="T"></typeparam>
|
/// <param name="fieldValue">字段值</param>
|
/// <param name="fieldName">字段名称</param>
|
/// <param name="collectionName">表名</param>
|
/// <returns></returns>
|
/// <history>[HanHe(XDL)] CREATED 2018/06/13</history>
|
public OperateResult RemoveData<T>(string fieldValue, string fieldName, string collectionName)
|
{
|
return CreateDAL<TN_WM_MONGODAL>().RemoveData<T>(fieldValue, fieldName, collectionName);
|
}
|
#endregion
|
|
#region 分页获取数据
|
public List<TN_WM_B_UNIQUE_BARCODEEntity> GetXmlList(SearchModel searchModel, out int total)
|
{
|
return CreateDAL<TN_WM_MONGODAL>().GetXmlList(searchModel, out total);
|
}
|
#endregion
|
|
#region
|
/// <summary>
|
/// 根据仓库获得所有库区
|
/// </summary>
|
/// <param name="stcokCode"></param>
|
/// <param name="type"></param>
|
/// <returns></returns>
|
/// <history>[HanHe(LT)] CREATED 2018/8/13</history>
|
public List<AutoBomStockAreaEntity> GetList(string stockCode, string type)
|
{
|
return CreateDAL<TN_WM_MONGODAL>().GetList(stockCode, type);
|
}
|
#endregion
|
|
#region 根据库区编码获取仓库信息
|
/// <summary>
|
/// 根据库区编码获取仓库信息
|
/// </summary>
|
/// <param name="areaCode">仓库编码</param>
|
/// <returns></returns>
|
public AutoBomStockAreaEntity GetStockArea(string areaCode)
|
{
|
AutoBomStockAreaEntity areaentity = CreateDAL<TN_WMS_AREADAL>().GetModel(areaCode);//获取库区名称
|
return areaentity;
|
}
|
#endregion
|
|
#region 根据编码删除
|
/// <summary>
|
/// 根据编码删除
|
/// </summary>
|
/// <typeparam name="T"></typeparam>
|
/// <param name="fieldValue">字段值</param>
|
/// <param name="fieldName">字段名称</param>
|
/// <param name="collectionName">表名</param>
|
/// <returns></returns>
|
/// <history>[HanHe(XDL)] CREATED 2018/06/13</history>
|
public OperateResult RemoveDataByCode<T>(string fieldValue, string fieldName, string collectionName)
|
{
|
return CreateDAL<TN_WM_MONGODAL>().RemoveDataByCode<T>(fieldValue, fieldName, collectionName);
|
}
|
#endregion
|
|
#region 获取仓库信息
|
/// <summary>
|
/// 获取仓库信息
|
/// </summary>
|
/// <param name="fieldName">字段名称</param>
|
/// <param name="inputValue">输入值</param>
|
/// <returns></returns>
|
/// <history>[HanHe(LT)] CREATED 2018/7/5</history>
|
public TN_AB_STOCKEntity GetStockentity(string fieldName, string inputValue)
|
{
|
return CreateDAL<TN_WM_MONGODAL>().GetStockentity(fieldName, inputValue);
|
}
|
#endregion
|
|
|
#region 获取虚拟库区
|
/// <summary>
|
/// 根据仓库获得所有库区
|
/// </summary>
|
/// <returns></returns>
|
/// <history>[HanHe(LT)] CREATED 2018/12/22</history>
|
public List<AutoBomStockAreaEntity> GetXNAreaList(string stockCode, string areaCode, string type)
|
{
|
return CreateDAL<TN_WM_MONGODAL>().GetXNAreaList(stockCode, areaCode, type);
|
}
|
#endregion
|
}
|
}
|