diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java index 3ecc063ea..9528cf673 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/cert/report/service/impl/ParamsReportDetailEOServiceImpl.java @@ -1263,6 +1263,9 @@ public class ParamsReportDetailEOServiceImpl extends ServiceImpl configIdList = Arrays.asList(paramsReportDetailVO.getConfigIds().split(",")); // 需要导出的配置列 List> dataList = paramsReportDetailEOMapper.listInfoForExport(idList, paramsReportDetailVO); // 查询需要导出的数据 + dataList = dataList.stream().collect(Collectors.collectingAndThen( + Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(p -> (String) p.get("id")))), + ArrayList::new)); // 去重 List paramsConfigEOList = paramsReportConfigEOService.queryList(paramsReportDetailVO.getParamsManifestId()); // 查询所有配置列 diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java index b492d8057..e21195135 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/WordUtil.java @@ -189,7 +189,7 @@ public class WordUtil { Drawing drawing = factory.createDrawing(); drawing.getAnchorOrInline().add(inline); run.getContent().add(drawing); - replaceTextToImage(bm, text, wordMLPackage, bytes); + replaceTextToImage(bm, "\\$\\{" + key + "\\}", text, wordMLPackage, bytes); } } } catch (Exception var17) { @@ -218,7 +218,7 @@ public class WordUtil { byte[] bytes = (byte[]) picMap.get("bytes"); for(Text bm : textList) { - if (bm.getValue().equals("${" + key + "}")) { + if (bm.getValue().contains("${" + key + "}")) { BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes); Inline inline = imagePart.createImageInline("", "", 0, 1, true); ObjectFactory factory = new ObjectFactory(); @@ -226,7 +226,7 @@ public class WordUtil { Drawing drawing = factory.createDrawing(); drawing.getAnchorOrInline().add(inline); run.getContent().add(drawing); - replaceTextToImage(bm, text, wordMLPackage, bytes); + replaceTextToImage(bm, "\\$\\{" + key + "\\}", text, wordMLPackage, bytes); } } } @@ -387,7 +387,7 @@ public class WordUtil { * @throws Exception * @author liyawei */ - public static void replaceTextToImage(Text bm, Object object, WordprocessingMLPackage wordMLPackage , byte[] bytes) throws Exception { + public static void replaceTextToImage(Text bm, String key, Object object, WordprocessingMLPackage wordMLPackage , byte[] bytes) throws Exception { if (wordMLPackage == null) { return; } @@ -423,16 +423,49 @@ public class WordUtil { BinaryPartAbstractImage imagePart = BinaryPartAbstractImage.createImagePart(wordMLPackage, bytes); Inline inline = imagePart.createImageInline("", "", 0, 1, true); ObjectFactory factory = Context.getWmlObjectFactory(); - R run = factory.createR(); +// R run = factory.createR(); Drawing drawing = factory.createDrawing(); - if(text != null){ - Text txt = factory.createText(); - txt.setValue(text); - run.getContent().add(txt); + + for(int j=0;j0 && !valueStr[k-1].equals("#")) { + Text txt = factory.createText(); + txt.setValue(values.substring(index, k)); + r.getContent().add(txt); + } + + if (text != null) { + Text txtp = factory.createText(); + txtp.setValue(text); + r.getContent().add(txtp); + } + r.getContent().add(drawing); + drawing.getAnchorOrInline().add(inline); + index = k + 1; + } + + } + + if(!values.endsWith("#")) { + Text txt = factory.createText(); + txt.setValue(values.substring(index)); + r.getContent().add(txt); + } + + theList.add(rangeStart, r); // 添加图片到原占位符位置 } else { return; diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 5dcd838f0..ee36dd5cd 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -1420,5 +1420,5 @@ module.exports = { endProcess:'结束流程', thereForTheCurrentlySelectedData:'当前所选数据暂无标准分解单', secondaryDirectory:'二级目录', - OnlyPersonsCanBeSelected:'超出最大上限;只能选择100个人员', + OnlyPersonsCanBeSelected:'超出最大上限;最多只能选择100个人员', } \ No newline at end of file diff --git a/jero-web/src/components/PersonnelSelection/index.vue b/jero-web/src/components/PersonnelSelection/index.vue index b84f99147..1bd0fb00e 100644 --- a/jero-web/src/components/PersonnelSelection/index.vue +++ b/jero-web/src/components/PersonnelSelection/index.vue @@ -316,6 +316,10 @@ }, handleSubmit() { // if (this.userIds && this.userIds.length > 0) { + if (this.userIds.length > 100 && this.selectDepartment) { + this.$message.warning(this.$t('OnlyPersonsCanBeSelected')) + return + } if (this.isSingleChoice) { if (this.userIds.length > 1) { this.$message.warning(this.$t('onlyOnePersonCanBeSelected')) @@ -324,16 +328,12 @@ } let userIds = JSON.parse(JSON.stringify(this.userIds)) let userName = JSON.parse(JSON.stringify(this.userName)) - userName = userName.filter(function(item, index) { - return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个 - }) - userIds = userIds.filter(function(item, index) { - return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个 - }) - if (userIds.length > 100 && this.selectDepartment) { - this.$message.warning(this.$t('OnlyPersonsCanBeSelected')) - return - } + // userName = userName.filter(function(item, index) { + // return userName.indexOf(item) === index // 因为indexOf 只能查找到第一个 + // }) + // userIds = userIds.filter(function(item, index) { + // return userIds.indexOf(item) === index // 因为indexOf 只能查找到第一个 + // }) this.$emit('input', userName.join(',')) this.$emit('change', this.query.db_field_name, userIds.join(','), this.query.subscript) this.visible = false diff --git a/jero-web/src/views/projectManagement/components/addModel.vue b/jero-web/src/views/projectManagement/components/addModel.vue index 65b190bd4..30c6324e2 100644 --- a/jero-web/src/views/projectManagement/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/addModel.vue @@ -112,6 +112,7 @@