|
|
|
|
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 FinishedInventoryQueryService : BaseService<MesOutPdline>, IFinishedInventoryQueryService
|
|
|
|
|
{
|
|
|
|
|
private readonly IFinishedInventoryQueryRepository repository;
|
|
|
|
|
|
|
|
|
|
public FinishedInventoryQueryService(IFinishedInventoryQueryRepository _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 mtoc, string enabled, Pager pager, String direction, String sort)
|
|
|
|
|
{
|
|
|
|
|
Hashtable result = new Hashtable();
|
|
|
|
|
String strWhere = " where 1 = 1 ";
|
|
|
|
|
|
|
|
|
|
if (mtoc != null && !mtoc.Trim().Equals("") && mtoc != "null")
|
|
|
|
|
{
|
|
|
|
|
strWhere += "and a.mtoc like '%" + mtoc.Trim() + "%' ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String orderBy = " a.mtoc ";
|
|
|
|
|
|
|
|
|
|
result = repository.getListByPage(pager.pageSize, pager.pageNo, strWhere, orderBy);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Hashtable getTrayNoListByPage(string mtoc, string trayNo, string enabled, Pager pager, String direction, String sort)
|
|
|
|
|
{
|
|
|
|
|
Hashtable result = new Hashtable();
|
|
|
|
|
String strWhere = " where 1 = 1 ";
|
|
|
|
|
|
|
|
|
|
if (mtoc != null && !mtoc.Trim().Equals("") && mtoc != "null")
|
|
|
|
|
{
|
|
|
|
|
strWhere += "and a.mtoc like '%" + mtoc.Trim() + "%' ";
|
|
|
|
|
}
|
|
|
|
|
if (trayNo != null && !trayNo.Trim().Equals("") && trayNo != "null")
|
|
|
|
|
{
|
|
|
|
|
strWhere += "and a.tray_no like '%" + trayNo.Trim() + "%' ";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
String orderBy = " a.mtoc ";
|
|
|
|
|
|
|
|
|
|
result = repository.getTrayNoListByPage(pager.pageSize, pager.pageNo, strWhere, orderBy);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public Hashtable getCartonNoListByPage(string mtoc, string trayNo, string enabled, Pager pager, String direction, String sort)
|
|
|
|
|
{
|
|
|
|
|
Hashtable result = new Hashtable();
|
|
|
|
|
String strWhere = " where 1 = 1 ";
|
|
|
|
|
|
|
|
|
|
if (mtoc != null && !mtoc.Trim().Equals("") && mtoc !="null")
|
|
|
|
|
{
|
|
|
|
|
strWhere += "and tray_no like '%" + trayNo.Trim() + "%' ";
|
|
|
|
|
}
|
|
|
|
|
strWhere += " and enabled = 'Y '";
|
|
|
|
|
String orderBy = " carton_no ";
|
|
|
|
|
|
|
|
|
|
result = repository.getCartonNoListByPage(pager.pageSize, pager.pageNo, strWhere, orderBy);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
public List<FinishedInventory> getMtocDetailsList(string mtoc)
|
|
|
|
|
{
|
|
|
|
|
String strWhere = " ";
|
|
|
|
|
if (mtoc != null && !mtoc.Trim().Equals(""))
|
|
|
|
|
{
|
|
|
|
|
strWhere += "and mtoc like '%" + mtoc.Trim() + "%' ";
|
|
|
|
|
}
|
|
|
|
|
String orderBy = " b.mtoc ";
|
|
|
|
|
|
|
|
|
|
return repository.getMtocDetailsList(strWhere, orderBy);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
}
|