You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123 lines
3.7 KiB
C#

2 years ago
using System.Data;
using System.Collections;
using Estsh.Core.Models;
using Estsh.Core.Repository.IRepositories;
using Estsh.Core.Services.IServices;
using Estsh.Core.Model.Result;
using Estsh.Core.Model.ExcelModel;
/***************************************************************************************************
*
* sitong.dong
*
* 2022.06.22
*
*
**************************************************************************************************/
namespace Estsh.Core.Services
{
public class PurchaseScheduleSingleService : BaseService<SysStock>, IPurchaseScheduleSingleService
{
private readonly IPurchaseScheduleSingleRepository repository;
public PurchaseScheduleSingleService(IPurchaseScheduleSingleRepository _repository) : base(_repository)
{
repository = _repository;
}
/// <summary>
/// 根据查询条件得出日程单收货数据结果集
/// </summary>
/// <param name="aWhere">查询条件</param>
/// <returns>符合条件的结果集</returns>
public Hashtable GetQuery(string aWhere)
{
return repository.GetQuery(aWhere);
}
public List<PurchaseScheduleSingle> getTableListByPage(string aWhere)
{
return repository.getTableListByPage(aWhere);
}
/// <summary>
/// 根据单号和车型查询库存明细
/// </summary>
/// <param name="orderNo">单据号</param>
/// <param name="typeName">车型名称</param>
/// <returns></returns>
public Hashtable GetStockDetail(string orderNo, string typeName)
{
return repository.GetStockDetail(orderNo, typeName);
}
/// <summary>
/// 获取所有的零件号
/// </summary>
/// <returns></returns>
public List<KeyValueResult> GetPart(string part_no)
{
return repository.GetPart(part_no);
}
/// <summary>
/// 获取所有的供应商名称
/// </summary>
/// <returns></returns>
public List<KeyValueResult> GetVendor(string key)
{
return repository.GetVendor(key);
}
/// <summary>
/// 获取所有的厂区名称
/// </summary>
/// <returns></returns>
public List<KeyValueResult> GetFactory()
{
return repository.GetFactory();
}
/// <summary>
/// 获取所有的车型名称
/// </summary>
/// <returns></returns>
public List<KeyValueResult> GetType()
{
return repository.GetType();
}
/// <summary>
/// 更新日程收获数据的is_close字段
/// </summary>
/// <param name="ruid">编号</param>
/// <returns></returns>
public bool UpdateIsClose(string ruid)
{
return repository.UpdateIsClose(ruid);
}
/// <summary>
///更改可用状态
/// </summary>
/// <param name="status">true or false</param>
/// <param name="dr">当前行</param>
/// <returns></returns>
public bool ChangeDetailStatus(bool status, DataRow dr)
{
return repository.ChangeDetailStatus(status, dr);
}
public bool DeleteDetail(DataRow dr)
{
return repository.DeleteDetail(dr);
}
/// <summary>
/// 获取采购订单关闭的密码
/// </summary>
/// <returns>密码</returns>
public string GetSysBase()
{
return repository.GetSysBase();
}
}
}