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 { /// /// 收货查询补打模块管理业务处理类 /// public class FinishedInventoryQueryService : BaseService, IFinishedInventoryQueryService { private readonly IFinishedInventoryQueryRepository repository; public FinishedInventoryQueryService(IFinishedInventoryQueryRepository _repository) : base(_repository) { repository = _repository; } #region 收货查询补打 /// /// 根据分页条件获取列表 /// /// /// /// /// /// 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 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 } }