bug: 78267政策法规资料流程入库权限问题修改
This commit is contained in:
+3
-2
@@ -39,8 +39,9 @@ public class ActSarLawsInformationEOService {
|
|||||||
}else {
|
}else {
|
||||||
createAndApproveBy = applyUserId + "," + approverId;
|
createAndApproveBy = applyUserId + "," + approverId;
|
||||||
}
|
}
|
||||||
sarLawsInformation.setDownloadableBy(createAndApproveBy);
|
// sarLawsInformation.setDownloadableBy(createAndApproveBy);
|
||||||
sarLawsInformation.setViewableBy(createAndApproveBy);
|
// sarLawsInformation.setViewableBy(createAndApproveBy);
|
||||||
|
sarLawsInformation.setCreateAndApproveBy(createAndApproveBy);
|
||||||
logger.info("政策法规资料入库:" + sarLawsInformation);
|
logger.info("政策法规资料入库:" + sarLawsInformation);
|
||||||
informationService.addLawsInformation(sarLawsInformation);
|
informationService.addLawsInformation(sarLawsInformation);
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-8
@@ -233,9 +233,6 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
|
|||||||
// 设置可见人和下载人
|
// 设置可见人和下载人
|
||||||
if (StringUtils.isNotBlank(sarLawsInformation.getViewableBy())) {
|
if (StringUtils.isNotBlank(sarLawsInformation.getViewableBy())) {
|
||||||
List<String> viewableByList = extractContentInParentheses(sarLawsInformation.getViewableBy());
|
List<String> viewableByList = extractContentInParentheses(sarLawsInformation.getViewableBy());
|
||||||
if (!viewableByList.contains(userId)) {
|
|
||||||
viewableByList.add(userId);
|
|
||||||
}
|
|
||||||
viewableByList.forEach(viewableBy -> {
|
viewableByList.forEach(viewableBy -> {
|
||||||
SarLawsInformationAuth auth = new SarLawsInformationAuth();
|
SarLawsInformationAuth auth = new SarLawsInformationAuth();
|
||||||
auth.setLawsInformationId(sarLawsInformation.getId());
|
auth.setLawsInformationId(sarLawsInformation.getId());
|
||||||
@@ -246,14 +243,11 @@ public class SarLawsInformationServiceImpl extends ServiceImpl<SarLawsInformatio
|
|||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(sarLawsInformation.getDownloadableBy())) {
|
if (StringUtils.isNotBlank(sarLawsInformation.getDownloadableBy())) {
|
||||||
List<String> downloadableByList = extractContentInParentheses(sarLawsInformation.getDownloadableBy());
|
List<String> downloadableByList = extractContentInParentheses(sarLawsInformation.getDownloadableBy());
|
||||||
if (!downloadableByList.contains(userId)) {
|
downloadableByList.forEach(downloadableBy -> {
|
||||||
downloadableByList.add(userId);
|
|
||||||
}
|
|
||||||
downloadableByList.forEach(viewableBy -> {
|
|
||||||
SarLawsInformationAuth auth = new SarLawsInformationAuth();
|
SarLawsInformationAuth auth = new SarLawsInformationAuth();
|
||||||
auth.setLawsInformationId(sarLawsInformation.getId());
|
auth.setLawsInformationId(sarLawsInformation.getId());
|
||||||
auth.setAuthType("downloadableBy");
|
auth.setAuthType("downloadableBy");
|
||||||
auth.setUserId(viewableBy);
|
auth.setUserId(downloadableBy);
|
||||||
authService.save(auth);
|
authService.save(auth);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user