新增生产订单单头接口

This commit is contained in:
2025-08-23 17:38:02 +08:00
parent 0aeb1889ac
commit d74421c3c1
7 changed files with 157 additions and 5 deletions

View 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;
}
}
}

View File

@@ -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" />