|
@@ -262,12 +262,12 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
|
|
|
.LeftJoin<OrderSnapshot>((redPackAudit, snapshot) => redPackAudit.OrderId == snapshot.Id)
|
|
|
.LeftJoin<Order>((redPackAudit, snapshot, order) => redPackAudit.OrderId == order.Id)
|
|
|
.LeftJoin<SpecialRedPackAudit>((redPackAudit, snapshot, order, special) => redPackAudit.OrderId == special.OrderId)
|
|
|
- .Where((redPackAudit, snapshot, order, special) => (snapshot.IndustryName == "安全隐患" && order.OrderTagCode!.Contains("DHZY")) || (order.CreationTime >=beginTime && order.CreationTime <= endTime && redPackAudit.ApprovedAmount == 20 && order.AcceptTypeCode != "30" && snapshot.IndustryName != "电气焊作业申报"))
|
|
|
+ .Where((redPackAudit, snapshot, order, special) => (redPackAudit.Status == ERedPackAuditStatus.Agree && snapshot.IndustryName == "安全隐患" && order.OrderTagCode!.Contains("DHZY")) || (redPackAudit.Status == ERedPackAuditStatus.Agree && order.CreationTime >=beginTime && order.CreationTime <= endTime && redPackAudit.ApprovedAmount == 20 && order.AcceptTypeCode != "30" && snapshot.IndustryName != "电气焊作业申报"))
|
|
|
.WhereIF(dto.Status == 0, (redPackAudit, snapshot, order, special) => special.Id == null)
|
|
|
.WhereIF(dto.Status == 1, (redPackAudit, snapshot, order, special) => special.Status == ERedPackAuditStatus.Agree)
|
|
|
.WhereIF(dto.Status == 2, (redPackAudit, snapshot, order, special) => special.Status == ERedPackAuditStatus.Refuse)
|
|
|
.OrderByDescending((redPackAudit, snapshot, order, special) => redPackAudit.CreationTime)
|
|
|
- .Select((redPackAudit, snapshot,order) => new SnapshotOrderAuditItemsOutDto
|
|
|
+ .Select((redPackAudit, snapshot,order, special) => new SnapshotOrderAuditItemsOutDto
|
|
|
{
|
|
|
Id = redPackAudit.Id,
|
|
|
RedPackAuditId = redPackAudit.Id,
|
|
@@ -297,14 +297,14 @@ public class RedPackApplication : IRedPackApplication, IScopeDependency
|
|
|
CreationTime = order.CreationTime,
|
|
|
OrgLevelOneCode = order.OrgLevelOneCode,
|
|
|
OrgLevelOneName = order.OrgLevelOneName,
|
|
|
- AuditId = redPackAudit.AuditId,
|
|
|
- AuditName = redPackAudit.AuditName,
|
|
|
- AuditOrgId = redPackAudit.AuditOrgId,
|
|
|
- AuditOrgName = redPackAudit.AuditOrgName,
|
|
|
- AuditRemark = redPackAudit.AuditRemark,
|
|
|
+ AuditId = special.AuditId,
|
|
|
+ AuditName = special.AuditName,
|
|
|
+ AuditOrgId = special.AuditOrgId,
|
|
|
+ AuditOrgName = special.AuditOrgName,
|
|
|
+ AuditRemark = special.AuditRemark,
|
|
|
//BankCardNo = record.BankCardNo,
|
|
|
//OpenBank = record.OpenBank,
|
|
|
- AuditStatus = redPackAudit.Status,
|
|
|
+ AuditStatus = special.Status,
|
|
|
});
|
|
|
return query;
|
|
|
}
|