|
@@ -74,15 +74,48 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
|
|
for(Element ek:table){
|
|
for(Element ek:table){
|
|
dqid.addAll(Func.toStrList("\\|\\|",ek.attr("dqid")));
|
|
dqid.addAll(Func.toStrList("\\|\\|",ek.attr("dqid")));
|
|
}
|
|
}
|
|
- if(Func.isNotEmpty(textdictInfo.getShowType()) && textdictInfo.getShowType() == 1){
|
|
|
|
- if(Func.isNotEmpty(dqid) && dqid.size() > 0){
|
|
|
|
- textdict = baseMapper.selectTextdictBYIds(dqid,privateInfo.getProjectId());
|
|
|
|
- }else {
|
|
|
|
- textdict = new ArrayList<>();
|
|
|
|
|
|
+ }
|
|
|
|
+ if(Func.isNotEmpty(textdictInfo.getShowType()) && textdictInfo.getShowType() == 1){
|
|
|
|
+ if(Func.isNotEmpty(dqid) && dqid.size() > 0){
|
|
|
|
+ textdict = baseMapper.selectTextdictBYIds(dqid,privateInfo.getProjectId());
|
|
|
|
+ }else {
|
|
|
|
+ textdict = new ArrayList<>();
|
|
|
|
+ }
|
|
|
|
+ if (!keys.isEmpty()) {
|
|
|
|
+ // 查询系统级电签配置
|
|
|
|
+ TextdictInfoVO temp = null;
|
|
|
|
+ if (textdict != null && !textdict.isEmpty()) {
|
|
|
|
+ temp = textdict.get(0);
|
|
|
|
+ }
|
|
|
|
+ if (temp == null) {
|
|
|
|
+ temp = new TextdictInfoVO();
|
|
|
|
+ temp.setProjectId(privateInfo.getProjectId());
|
|
|
|
+ temp.setExcelId(privateInfo.getExcelId() + "");
|
|
|
|
+ temp.setTabId(privateInfo.getPKeyId() + "");
|
|
|
|
+ temp.setType(2);
|
|
|
|
+ }
|
|
|
|
+ List<TextdictInfoVO> textdictList = iSignConfigService.hasSignConfig(privateInfo.getInitTableName(), keys, temp);
|
|
|
|
+ if (textdict == null || textdict.isEmpty()) {
|
|
|
|
+ textdict = textdictList;
|
|
|
|
+ } else {
|
|
|
|
+ Map<String, TextdictInfoVO> map = textdict.stream().collect(Collectors.toMap(TextdictInfoVO::getColKey, TextdictInfoVO -> TextdictInfoVO, (v1, v2) -> v1));
|
|
|
|
+ List<TextdictInfoVO> collect = textdictList.stream().filter(textdictInfoVO -> {
|
|
|
|
+ TextdictInfoVO vo = map.get(textdictInfoVO.getColKey());
|
|
|
|
+ if (vo != null && vo.getSigRoleId() != null && !vo.getSigRoleId().isEmpty()) {
|
|
|
|
+ List<String> projectRoleIds = Arrays.asList(vo.getSigRoleId().split(","));
|
|
|
|
+ List<String> systemRoleIds = new ArrayList<>(Arrays.asList(textdictInfoVO.getSigRoleId().split(",")));
|
|
|
|
+ // 如果 projectRoleIds 包含所有 systemRoleIds,则返回 false
|
|
|
|
+ systemRoleIds.removeAll(projectRoleIds);
|
|
|
|
+ return !systemRoleIds.isEmpty();
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }).collect(Collectors.toList());
|
|
|
|
+ textdict.addAll(collect);
|
|
}
|
|
}
|
|
- }else{
|
|
|
|
- textdict = baseMapper.selectTextdictInfoByExcelId(page, textdictInfo);
|
|
|
|
}
|
|
}
|
|
|
|
+ }else{
|
|
|
|
+ textdict = baseMapper.selectTextdictInfoByExcelId(page, textdictInfo);
|
|
|
|
+ }
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
throw new RuntimeException(e);
|
|
throw new RuntimeException(e);
|
|
}
|
|
}
|