bug: 78267政策法规资料流程入库权限问题修改

This commit is contained in:
wxyclub
2023-11-28 20:10:34 +08:00
parent 942c1a0ede
commit 19cc83fd94
2 changed files with 5 additions and 10 deletions
@@ -39,8 +39,9 @@ public class ActSarLawsInformationEOService {
}else {
createAndApproveBy = applyUserId + "," + approverId;
}
sarLawsInformation.setDownloadableBy(createAndApproveBy);
sarLawsInformation.setViewableBy(createAndApproveBy);
// sarLawsInformation.setDownloadableBy(createAndApproveBy);
// sarLawsInformation.setViewableBy(createAndApproveBy);
sarLawsInformation.setCreateAndApproveBy(createAndApproveBy);
logger.info("政策法规资料入库:" + sarLawsInformation);
informationService.addLawsInformation(sarLawsInformation);
}
@@ -233,9 +233,6 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
// 设置可见人和下载人
if (StringUtils.isNotBlank(sarLawsInformation.getViewableBy())) {
List<String> viewableByList = extractContentInParentheses(sarLawsInformation.getViewableBy());
if (!viewableByList.contains(userId)) {
viewableByList.add(userId);
}
viewableByList.forEach(viewableBy -> {
SarLawsInformationAuth auth = new SarLawsInformationAuth();
auth.setLawsInformationId(sarLawsInformation.getId());
@@ -246,14 +243,11 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
}
if (StringUtils.isNotBlank(sarLawsInformation.getDownloadableBy())) {
List<String> downloadableByList = extractContentInParentheses(sarLawsInformation.getDownloadableBy());
if (!downloadableByList.contains(userId)) {
downloadableByList.add(userId);
}
downloadableByList.forEach(viewableBy -> {
downloadableByList.forEach(downloadableBy -> {
SarLawsInformationAuth auth = new SarLawsInformationAuth();
auth.setLawsInformationId(sarLawsInformation.getId());
auth.setAuthType("downloadableBy");
auth.setUserId(viewableBy);
auth.setUserId(downloadableBy);
authService.save(auth);
});
}