人事系统,选择在职时,只显示当月在职员工,但是希望能显示当月在职+当月离职员工,逻辑是:选择在职时,fd_alter_time要在${fd_U_Year_Month}之后fd_alter_time:OA账号修改时间${fd_U_Year_Month}:就是第一个“年月”参数我不知道怎么在参数是再加条件,希望大家给点思路代码:SELECTp.fd_login_name,e.fd_name,p2.zws,OPRJ.U_PrjCode,OPRJ.U_PrjName,SUM(act1.fd_U_Hours) AS sumHoursFROM sys_org_person as p left join sys_org_element as e on p.fd_id=e.fd_idleft join ekp_jz_working_hours act1 on p.fd_login_name = act1.fd_person_id and act1.fd_U_Approve=1and cast(act1.fd_U_Year as varchar)+'-'+cast(act1.fd_U_Month as varchar) = '${fd_U_Year_Month}'left join View_sap_AVA_OPS_OPRJ OPRJ on act1.fd_U_PrjCode = OPRJ.U_PrjCode left join View_ljh_person_2 p2 on p.fd_id=p2.fd_idleft join dev_members_relationship dmr on p.fd_id=dmr.oa_idwhere e.fd_org_type = '8' ${if(len(fd_is_available)==0,"","and e.fd_is_available = '"+fd_is_available+"'")} ${if(len(U_PrjCode)==0,"","and OPRJ.U_PrjCode like '%"+U_PrjCode+"%'")} ${if(len(U_PrjName)==0,"","and OPRJ.U_PrjName like '%"+U_PrjName+"%'")} ${if(len(fd_name)==0,"","and e.fd_name like '%"+fd_name+"%'")} ${if(len(zws)==0,"","and p2.zws like '%"+zws+"%'")} ${if(len(U_PrjType)==0,"","and OPRJ.U_PrjType = '"+U_PrjType+"'")} ${if(len(user_type)==0,"","and dmr.user_type = '"+user_type+"'")}group by p.fd_login_name,e.fd_name,p2.zws,OPRJ.U_PrjCode,OPRJ.U_PrjNameorder by p2.zws desc