月报整合导出-只能导出自己的草稿

This commit is contained in:
zhn
2023-10-20 10:29:09 +08:00
parent a8720aedc5
commit c8701bcf98
@@ -496,6 +496,17 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl<LawsMonthly
// wrapper.in(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername()); // wrapper.in(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername());
// } // }
//---------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------
//草稿只能自己查看,已提交的所有人都可以查看
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
wrapper.and(q->{
q.eq(LawsMonthlyReportWriteEO::getSaveState, SaveStateEnum.SUBMIT.getValue());
q.or().isNull(LawsMonthlyReportWriteEO::getSaveState);
q.or(queryWrapper->{
queryWrapper.eq(LawsMonthlyReportWriteEO::getCreateBy,currentUser.getUsername());
queryWrapper.eq(LawsMonthlyReportWriteEO::getSaveState,SaveStateEnum.SAVE.getValue());
});
});
List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS = this.list(wrapper); List<LawsMonthlyReportWriteEO> lawsMonthlyReportWriteEOS = this.list(wrapper);
if(lawsMonthlyReportWriteEOS.size() == 0){ if(lawsMonthlyReportWriteEOS.size() == 0){