This commit is contained in:
2025-06-03 15:00:18 +08:00
parent 96b6a8b04e
commit 253606b808
7 changed files with 105 additions and 25 deletions

View File

@@ -12,6 +12,7 @@ using MyCode.Project.Infrastructure.Search;
using MyCode.Project.Domain.Message.Response.PurchaseOrder;
using MyCode.Project.Domain.Message.Request.PurchaseOrder;
using MyCode.Project.Infrastructure.Extensions;
using MyCode.Project.Domain.Config;
namespace MyCode.Project.Repositories
{
@@ -20,7 +21,7 @@ namespace MyCode.Project.Repositories
public PurchaseOrderRepository(MyCodeSqlSugarClient context) : base(context)
{ }
string ReceiveorgCode = SystemConfig.ReceiveorgCode;
/// <summary>
/// 采购订单分页列表
/// </summary>
@@ -48,7 +49,9 @@ namespace MyCode.Project.Repositories
where.AddCondition("a.FPurchaseOrgId", FPurchaseOrgId, SqlOperator.Equal, !string.IsNullOrWhiteSpace(FPurchaseOrgId) && FPurchaseOrgId != "-1");
where.AddCondition("b.MaterialCode", condition.MaterialCode, SqlOperator.Like, !string.IsNullOrWhiteSpace(condition.MaterialCode));
where.AddCondition("b.FMRPCloseStatus", condition.FMRPCloseStatus, SqlOperator.Equal, !string.IsNullOrWhiteSpace(condition.FMRPCloseStatus) && condition.FMRPCloseStatus != "-1");
string sql = $@"select a.[Id] AS FormId
string sql = $@"select a.[Id] AS FormId ,1 IfFaHuo
,[SupplierName]
,[Purchaser]
,[PurchaserId]
@@ -87,6 +90,12 @@ namespace MyCode.Project.Repositories
{
t.NewChengNuoJiaoQi = DateTime.Parse(t.NewChengNuoJiaoQi).ToString("yyyy-MM-dd");
}
if (!string.IsNullOrWhiteSpace(ReceiveorgCode))
{
if (t.ReceiveorgCode != ReceiveorgCode)
t.IfFaHuo = 0;
}
});
return list;