新增生产订单单头接口
This commit is contained in:
parent
0aeb1889ac
commit
d74421c3c1
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MyCode.Project.Domain.Message.Response.LxmZHMDReport
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产订单大屏数据
|
||||
/// </summary>
|
||||
public class PrdMoOrderResp
|
||||
{
|
||||
/// <summary>
|
||||
/// 生产订单Id
|
||||
/// </summary>
|
||||
public int Fid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单编号
|
||||
/// </summary>
|
||||
public string FBILLNO { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单编号
|
||||
/// </summary>
|
||||
public DateTime FDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总数量
|
||||
/// </summary>
|
||||
public decimal Qty { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 入库总数量
|
||||
/// </summary>
|
||||
public decimal InStockQty { get; set; }
|
||||
}
|
||||
}
|
||||
@ -68,6 +68,7 @@
|
||||
<Compile Include="Message\Response\Common\IdName.cs" />
|
||||
<Compile Include="Message\Response\Common\ItemResult.cs" />
|
||||
<Compile Include="Message\Response\Common\ListHeadFieldData.cs" />
|
||||
<Compile Include="Message\Response\LxmZHMDReport\PrdMoOrderResp.cs" />
|
||||
<Compile Include="Message\Response\LxmZHMDReport\ReportCalRateResp.cs" />
|
||||
<Compile Include="Message\Response\LxmZHMDReport\SalOrderResp.cs" />
|
||||
<Compile Include="Message\Response\Queue\QueueProcess.cs" />
|
||||
@ -95,6 +96,7 @@
|
||||
<Compile Include="Model\YTKJTShopParameter.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="Repositories\IApiLogRepository.cs" />
|
||||
<Compile Include="Repositories\IMOOrdersRepository.cs" />
|
||||
<Compile Include="Repositories\IJackOrdersRepository.cs" />
|
||||
<Compile Include="Repositories\IPushKingDeeOrderRepository.cs" />
|
||||
<Compile Include="Repositories\IRepository.cs" />
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MyCode.Project.Infrastructure;
|
||||
using MyCode.Project.Domain;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Domain.Message;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
|
||||
namespace MyCode.Project.Domain.Repositories
|
||||
{
|
||||
public interface IMOOrdersRepository : IRepository<JackOrders>
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取生产数据
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
PageResult<PrdMoOrderResp> GetPrdMoPageList(PagedSearch search);
|
||||
|
||||
}
|
||||
}
|
||||
64
Reportapi/MyCode.Project.Repositories/MOOrdersRepository.cs
Normal file
64
Reportapi/MyCode.Project.Repositories/MOOrdersRepository.cs
Normal file
@ -0,0 +1,64 @@
|
||||
using MyCode.Project.Repositories.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using MyCode.Project.Domain.Message;
|
||||
using MyCode.Project.Domain.Model;
|
||||
using MyCode.Project.Domain.Repositories;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.Search;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
|
||||
namespace MyCode.Project.Repositories
|
||||
{
|
||||
public class MOOrdersRepository : Repository<JackOrders>, IMOOrdersRepository
|
||||
{
|
||||
public MOOrdersRepository(MyCodeSqlSugarClient context) : base(context)
|
||||
{ }
|
||||
|
||||
|
||||
|
||||
|
||||
public PageResult<PrdMoOrderResp> GetPrdMoPageList(PagedSearch search)
|
||||
{
|
||||
SearchCondition where = new SearchCondition();
|
||||
where.AddSqlCondition("1=1 ", true);
|
||||
|
||||
string sql = $@"
|
||||
SELECT
|
||||
*
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
t1.FID Fid,
|
||||
t1.FBILLNO FBillNo,
|
||||
t1.FDATE FDate,
|
||||
SUM(t1e.FQTY) Qty,
|
||||
SUM(
|
||||
t1e_a.FSTOCKINFAILAUXQTY + t1e_a.FSTOCKINQUAAUXQTY
|
||||
) InStockQty
|
||||
FROM
|
||||
T_PRD_MO t1
|
||||
LEFT JOIN T_PRD_MOENTRY t1e ON t1.FID = t1e.FID
|
||||
LEFT JOIN T_PRD_MOENTRY_A t1e_a ON t1e.FENTRYID = t1e_a.FENTRYID
|
||||
WHERE
|
||||
1 = 1
|
||||
AND t1.FDOCUMENTSTATUS = 'C'
|
||||
GROUP BY
|
||||
t1.FID,
|
||||
t1.FBILLNO,
|
||||
t1.FDATE
|
||||
) t1Temp
|
||||
|
||||
";
|
||||
|
||||
|
||||
var list = this.SelectListPage<PrdMoOrderResp>(sql, where, search.Page, search.PageSize, $@"FDATE desc ");
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@ -86,6 +86,7 @@
|
||||
<Compile Include="Common\Repository`.cs" />
|
||||
<Compile Include="Common\TransactionCallHandler.cs" />
|
||||
<Compile Include="Common\TransactionCallHandlerAttribute.cs" />
|
||||
<Compile Include="MOOrdersRepository.cs" />
|
||||
<Compile Include="JackOrdersRepository.cs" />
|
||||
<Compile Include="Lxm\LxmReportRepository.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
using MyCode.Project.Infrastructure.JackYun;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.JackYun;
|
||||
|
||||
namespace MyCode.Project.Services
|
||||
{
|
||||
public interface IPrdOrderService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 获取生产订单列表数据
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
PageResult<PrdMoOrderResp> GetPrdMoPageList(PagedSearch search);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,7 +1,9 @@
|
||||
using MyCode.Project.Domain.Message.Request.JackYun;
|
||||
using MyCode.Project.Domain.Message.Response.LxmZHMDReport;
|
||||
using MyCode.Project.Domain.Repositories;
|
||||
using MyCode.Project.Infrastructure.Common;
|
||||
using MyCode.Project.Infrastructure.JackYun;
|
||||
using MyCode.Project.Repositories;
|
||||
using System;
|
||||
|
||||
namespace MyCode.Project.Services.Implementation
|
||||
@ -9,11 +11,21 @@ namespace MyCode.Project.Services.Implementation
|
||||
public class PrdOrderService : ServiceBase, IPrdOrderService
|
||||
{
|
||||
|
||||
private IYTKJTShopParameterRepository _yTKJTShopParameterRepository;
|
||||
private IMOOrdersRepository _MOOrdersRepository;
|
||||
|
||||
public PrdOrderService(IYTKJTShopParameterRepository yTKJTShopParameterRepository)
|
||||
public PrdOrderService(IMOOrdersRepository MOOrdersRepository)
|
||||
{
|
||||
_yTKJTShopParameterRepository = yTKJTShopParameterRepository;
|
||||
_MOOrdersRepository = MOOrdersRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 生产订单列表
|
||||
/// </summary>
|
||||
/// <param name="search"></param>
|
||||
/// <returns></returns>
|
||||
public PageResult<PrdMoOrderResp> GetPrdMoPageList(PagedSearch search)
|
||||
{
|
||||
return _MOOrdersRepository.GetPrdMoPageList(search);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user