|
|
using System.Collections;
|
|
|
using Estsh.Core.Models;
|
|
|
using Estsh.Core.Repository.IRepositories;
|
|
|
using Estsh.Core.Util;
|
|
|
using Estsh.Core.Services.IServices;
|
|
|
using Estsh.Core.Model.Result;
|
|
|
using Estsh.Core.Dapper;
|
|
|
using Estsh.Core.Model.ExcelModel;
|
|
|
|
|
|
/***************************************************************************************************
|
|
|
*
|
|
|
* 更新人:sitong.dong
|
|
|
* 描述:收货查询补打模块业务处理类
|
|
|
* 修改时间:2022.06.22
|
|
|
* 修改日志:系统迭代升级
|
|
|
*
|
|
|
**************************************************************************************************/
|
|
|
namespace Estsh.Core.Services
|
|
|
{
|
|
|
/// <summary>
|
|
|
/// 收货查询补打模块管理业务处理类
|
|
|
/// </summary>
|
|
|
public class FinishedHalfInventoryQueryService : BaseService<MesOutPdline>, IFinishedHalfInventoryQueryService
|
|
|
{
|
|
|
private readonly IFinishedHalfInventoryQueryRepository repository;
|
|
|
|
|
|
public FinishedHalfInventoryQueryService(IFinishedHalfInventoryQueryRepository _repository) : base(_repository)
|
|
|
{
|
|
|
repository = _repository;
|
|
|
}
|
|
|
#region 收货查询补打
|
|
|
|
|
|
/// <summary>
|
|
|
/// 根据分页条件获取列表
|
|
|
/// </summary>
|
|
|
/// <param name="account"></param>
|
|
|
/// <param name="pager"></param>
|
|
|
/// <param name="direction"></param>
|
|
|
/// <param name="sort"></param>
|
|
|
/// <returns></returns>
|
|
|
public Hashtable getListByPage(string partNo, string partSpec,string enabled, int factoryId, Pager pager, String direction, String sort)
|
|
|
{
|
|
|
Hashtable result = new Hashtable();
|
|
|
String strWhere = " ";
|
|
|
|
|
|
if (partNo != null && !partNo.Trim().Equals(""))
|
|
|
{
|
|
|
strWhere += "and part_no like '%" + partNo.Trim() + "%' ";
|
|
|
}
|
|
|
|
|
|
String strWhere2 = " ";
|
|
|
if (partSpec != null && !partSpec.Trim().Equals(""))
|
|
|
{
|
|
|
strWhere += "and part_spec like '%" + partSpec.Trim() + "%' ";
|
|
|
}
|
|
|
|
|
|
String orderBy = "";
|
|
|
if (sort != null && !"".Equals(sort.Trim()))
|
|
|
{
|
|
|
orderBy += "a." + typeof(MesOutPdline).GetEntityColumnName(sort.Trim()) + " " + direction;
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
orderBy += "a." + typeof(MesOutPdline).GetEntityColumnName("PartNo") + " " + direction;
|
|
|
}
|
|
|
|
|
|
result = repository.getListByPage(pager.pageSize, pager.pageNo, strWhere, orderBy);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
public List<FinishedHalfInventory> getExportList(string partNo, string partSpec, string enabled, string factoryId)
|
|
|
{
|
|
|
String strWhere = " ";
|
|
|
if (partNo != null && !partNo.Trim().Equals(""))
|
|
|
{
|
|
|
strWhere += "and part_no like '%" + partNo.Trim() + "%' ";
|
|
|
}
|
|
|
|
|
|
String strWhere2 = " ";
|
|
|
if (partSpec != null && !partSpec.Trim().Equals(""))
|
|
|
{
|
|
|
strWhere += "and part_spec like '%" + partSpec.Trim() + "%' ";
|
|
|
}
|
|
|
|
|
|
String orderBy = " a.part_no ";
|
|
|
return repository.getExportList(strWhere, orderBy);
|
|
|
}
|
|
|
#endregion
|
|
|
}
|
|
|
} |