@@ -253,7 +253,6 @@ LEFT JOIN rb_workflow_auditrelevance war on wa.AuditId=war.Id
stringwhere=" where 1=1 ";
where+=string.Format(" AND pu.{0}={1}",nameof(RB_Property_UseReceive_Extend.Status),0);
where+=$@" and pu.RB_Group_Id={dmodel.RB_Group_Id}";
where+=$@" and ar.SpecialNode=2 and ar.Stauts=1 and (ar2.Stauts=2 or ar2.Id is null)";
if(!string.IsNullOrEmpty(dmodel.OrderCode))
{
where+=" and pu."+nameof(RB_Property_UseReceive_Extend.OrderCode)+" like '%"+dmodel.OrderCode+"%'";
...
...
@@ -296,12 +295,14 @@ LEFT JOIN rb_workflow_auditrelevance war on wa.AuditId=war.Id
}
if(dmodel.AuditEmId>0)
{
where+=$@" and ar.SpecialNode=2 and ar.Stauts=1 and (ar2.Stauts=2 or ar2.Id is null)";
where+=" and wa."+nameof(Rb_Workflow_Auditrecord.AuditEmId)+"="+dmodel.AuditEmId;
where+=" and wa."+nameof(Rb_Workflow_Auditrecord.AuditStatus)+"="+(int)WFRrocessStatus.NotAudit;
where+=" and pu."+nameof(RB_Property_UseReceive_Extend.AuditStatus)+"="+(int)OrderStateEnum.Auditing;//需要申请单在审核中
}
if(dmodel.AuditedEmId>0)
{
where+=$@" and ar.SpecialNode=2 and ar.Stauts=2 ";
where+=" and wa."+nameof(Rb_Workflow_Auditrecord.AuditEmId)+"="+dmodel.AuditedEmId;
where+=" and wa."+nameof(Rb_Workflow_Auditrecord.AuditStatus)+" in("+(int)WFRrocessStatus.AuditThrough+","+(int)WFRrocessStatus.AuditNotThrough+","+(int)WFRrocessStatus.Rejected+")";