|
|
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;
|
|
|
|
|
|
/***************************************************************************************************
|
|
|
*
|
|
|
* 更新人:sitong.dong
|
|
|
* 描述:零星生产计划
|
|
|
* 修改时间:2022.06.22
|
|
|
* 修改日志:系统迭代升级
|
|
|
*
|
|
|
**************************************************************************************************/
|
|
|
namespace Estsh.Core.Services
|
|
|
{
|
|
|
public class StockOrderReleaseService : BaseService<GOrder>, IStockOrderReleaseService
|
|
|
{
|
|
|
private readonly IStockOrderReleaseRepository repository;
|
|
|
|
|
|
public StockOrderReleaseService(IStockOrderReleaseRepository _repository) : base(_repository)
|
|
|
{
|
|
|
repository = _repository;
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 获取客户产线列表
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public List<KeyValueResult> GetCustPDLine()
|
|
|
{
|
|
|
return repository.GetCustPDLine();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 根据客户产线查询车型
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public List<KeyValueResult> GetMode_type(string CustPDLine)
|
|
|
{
|
|
|
return repository.GetMode_type(CustPDLine);
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
///<summary>
|
|
|
/// 释放生产指令
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public string ReleaseOrder(string cbCustPDLine, int cbShift, int Qty)
|
|
|
{
|
|
|
return repository.ReleaseOrder(cbCustPDLine, cbShift, Qty);
|
|
|
}
|
|
|
|
|
|
|
|
|
///<summary>
|
|
|
/// 单页打印数量
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public string getPrintQty()
|
|
|
{
|
|
|
return repository.getPrintQty();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 汇总
|
|
|
/// </summary>
|
|
|
/// <param name="aWhere"></param>
|
|
|
/// <param name="pager"></param>
|
|
|
/// <returns></returns>
|
|
|
public List<GOrder> GetOrderSummary(string cust_pdline, ref Pager pager)
|
|
|
{
|
|
|
return repository.GetOrderSummary(cust_pdline, ref pager);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 明细
|
|
|
/// </summary>
|
|
|
/// <param name="aWhere">查询条件</param>
|
|
|
/// <returns></returns>
|
|
|
public List<GOrder> GetOrderDetail(string aWhere, ref Pager pager)
|
|
|
{
|
|
|
return repository.GetOrderDetail(aWhere, ref pager);
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 异常
|
|
|
/// </summary>
|
|
|
/// <param name="aWhere"></param>
|
|
|
/// <returns></returns>
|
|
|
public List<GWorkorder> GetOrderErrorMessage(string aWhere, ref Pager pager)
|
|
|
{
|
|
|
return repository.GetOrderErrorMessage(aWhere, ref pager);
|
|
|
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取班次
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public List<KeyValueResult> Getshift()
|
|
|
{
|
|
|
return repository.Getshift();
|
|
|
}
|
|
|
|
|
|
//获取单号
|
|
|
public string getNumber()
|
|
|
{
|
|
|
return repository.getNumber();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 初始化单号
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public bool InitializeNumber()
|
|
|
{
|
|
|
return repository.InitializeNumber();
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 变更状态
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public string changeStatus(int order_id, int status)
|
|
|
{
|
|
|
return repository.changeStatus(order_id, status);
|
|
|
}
|
|
|
|
|
|
public string getProductionTaskNumber()
|
|
|
{
|
|
|
return repository.getProductionTaskNumber();
|
|
|
}
|
|
|
|
|
|
public string updateProductionTaskNumber()
|
|
|
{
|
|
|
return repository.updateProductionTaskNumber();
|
|
|
}
|
|
|
|
|
|
public string updateWorkOrderPrintNumber(string ruid, string ProductionTaskNumber)
|
|
|
{
|
|
|
return repository.updateWorkOrderPrintNumber(ruid, ProductionTaskNumber);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取打印数据
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public List<GWorkorder> getPrintData(string cbCustPDLine)
|
|
|
{
|
|
|
return repository.getPrintData(cbCustPDLine);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 获取打印数据
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
public List<GWorkorder> getPrintData(string cbCustPDLine, string printDate, string printNumber)
|
|
|
{
|
|
|
return repository.getPrintData(cbCustPDLine, printDate, printNumber);
|
|
|
}
|
|
|
}
|
|
|
}
|