From 6db19f6e9d9190573af08f376d74b128deb44b2f Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Wed, 19 Aug 2026 16:38:07 +0800 Subject: [PATCH] commit --- .../common/ProposalCommonServiceImpl.java | 4 ++ .../impl/ProposalExportServiceImpl.java | 59 +++++++++++++++++-- .../zhgh/democratic/proposal/common/info.js | 40 ++++++++++--- .../proposal/config/type/index.html | 2 +- .../proposal/config/unit/baiscForm.js | 2 +- .../proposal/config/unit/index.html | 2 +- .../democratic/proposal/dashboard/index.html | 2 +- .../proposal/export/comprehensive/index.html | 7 ++- .../proposal/export/singleCustom/index.html | 6 +- .../proposal/query/collectProgress/index.html | 7 ++- .../proposal/query/comprehensive/index.html | 8 ++- .../proposal/query/delegation/index.html | 9 ++- .../query/delegation/proposalTable.js | 4 ++ .../proposal/query/history/index.html | 7 ++- .../proposal/query/underTakeReply/index.html | 6 +- .../query/underTakeSatisfaction/index.html | 6 +- .../proposal/query/yearReport/index.html | 7 ++- .../proposal/senior/basic/index.html | 2 +- .../proposal/senior/delete/index.html | 2 +- .../proposal/senior/expediting/index.html | 4 +- .../proposal/senior/feedback/index.html | 7 ++- .../proposal/senior/type/index.html | 2 +- .../proposal/transact/allFinished/index.html | 2 +- .../proposal/transact/caseCheck/index.html | 2 +- .../proposal/transact/commissioner/index.html | 2 +- .../transact/committeeFiling/index.html | 41 +++++++++++++ .../transact/committeeFiling/merge.js | 49 ++++++++++++++- .../transact/committeeFilingUnit/index.html | 43 +++++++++++++- .../proposal/transact/control/index.html | 2 +- .../proposal/transact/delegation/index.html | 2 +- .../proposal/transact/feedback/index.html | 2 +- .../proposal/transact/invite/form.html | 6 ++ .../proposal/transact/invite/index.html | 2 +- .../proposal/transact/mine/index.html | 6 +- .../proposal/transact/mine/inviteSeconder.js | 4 ++ .../proposal/transact/preAudit/index.html | 2 +- .../transact/schoolLeaderApproval/index.html | 2 +- .../proposal/transact/seconded/index.html | 2 +- .../proposal/transact/suggestion/index.html | 2 +- .../transact/unSubmitQuery/index.html | 2 +- .../proposal/transact/unitRead/index.html | 1 + .../proposal/transact/unitReply/index.html | 2 +- .../transact/viceDelegation/index.html | 2 +- 43 files changed, 317 insertions(+), 56 deletions(-) diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/service/common/ProposalCommonServiceImpl.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/service/common/ProposalCommonServiceImpl.java index 2e980dff..c7b1ff71 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/service/common/ProposalCommonServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/service/common/ProposalCommonServiceImpl.java @@ -402,6 +402,10 @@ public class ProposalCommonServiceImpl extends BaseServiceImpl imp keywordCondition.orLike("info.createUserName", keyword); keywordCondition.orLike("info.createUserLoginName", keyword); } + // 立案编号由立案环节生成,选中该搜索来源时按编号进行模糊匹配。 + if (ArrayUtil.contains(pageForm.getOrigins(), "caseFilingCode")) { + keywordCondition.orLike("info.caseFilingCode", keyword); + } if (searchAnswer) { keywordCondition.orLike("JSON_EXTRACT(replyTask.variable,'$.tf_opinion')", keyword); } diff --git a/src/main/java/com/budwk/app/zhgh/democratic/proposal/service/impl/ProposalExportServiceImpl.java b/src/main/java/com/budwk/app/zhgh/democratic/proposal/service/impl/ProposalExportServiceImpl.java index 6077bc81..03eaa739 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/proposal/service/impl/ProposalExportServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/proposal/service/impl/ProposalExportServiceImpl.java @@ -29,6 +29,7 @@ import com.deepoove.poi.XWPFTemplate; import com.deepoove.poi.config.Configure; import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy; import lombok.extern.slf4j.Slf4j; +import org.apache.poi.ss.usermodel.BorderStyle; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.Font; @@ -75,6 +76,7 @@ public class ProposalExportServiceImpl extends BaseServiceImpl imp private static final String WORK_SUGGESTION_SECTION_MARKER = "__WORK_SUGGESTION_SECTION__"; private static final int UNDERTAKE_UNIT_EXPORT_COLUMN_COUNT = 6; + private static final int UNDERTAKE_UNIT_SECOND_TITLE_ROW_INDEX = 1; @Inject private ProposalCommonService proposalCommonService; @@ -448,12 +450,12 @@ public class ProposalExportServiceImpl extends BaseServiceImpl imp */ private Workbook buildUndertakeUnitWorkbook(String title, String unitName, List excelRows) { List exportEntities = new ArrayList<>(); - exportEntities.add(new ExcelExportEntity("立案编号", "caseFilingCode", 18)); - exportEntities.add(new ExcelExportEntity("提案名称", "name", 65)); - exportEntities.add(new ExcelExportEntity("提案人", "createUserName", 15)); - exportEntities.add(new ExcelExportEntity("主办单位", "masterUnitNames", 28)); - exportEntities.add(new ExcelExportEntity("协办单位", "slaveUnitNames", 28)); - exportEntities.add(new ExcelExportEntity("工作建议送达单位", "workSuggestionUnitNames", 32)); + exportEntities.add(new ExcelExportEntity("立案编号", "caseFilingCode", 11)); + exportEntities.add(new ExcelExportEntity("提案名称", "name", 43)); + exportEntities.add(new ExcelExportEntity("提案人", "createUserName", 13)); + exportEntities.add(new ExcelExportEntity("主办单位", "masterUnitNames", 19)); + exportEntities.add(new ExcelExportEntity("协办单位", "slaveUnitNames", 25)); + exportEntities.add(new ExcelExportEntity("工作建议送达单位", "workSuggestionUnitNames", 17)); for (ExcelExportEntity exportEntity : exportEntities) { exportEntity.setWrap(true); } @@ -467,9 +469,54 @@ public class ProposalExportServiceImpl extends BaseServiceImpl imp exportParams.setHeight((short) 13); Workbook workbook = ExcelExportUtil.exportExcel(exportParams, exportEntities, excelRows); mergeWorkSuggestionSection(workbook); + applyUndertakeUnitWorkbookStyle(workbook); return workbook; } + /** + * 为承办单位表的全部有效单元格设置细实线边框,并保证第二行承办单位名称加粗且水平、垂直居中。 + * 相同原始样式复用同一个克隆样式,避免按单元格重复创建样式导致工作簿样式数量过多。 + */ + private void applyUndertakeUnitWorkbookStyle(Workbook workbook) { + Sheet sheet = workbook.getSheetAt(0); + Map borderedStyles = new HashMap<>(); + Font unitNameFont = workbook.createFont(); + unitNameFont.setFontName("宋体"); + unitNameFont.setFontHeightInPoints((short) 11); + unitNameFont.setBold(true); + for (int rowIndex = 0; rowIndex <= sheet.getLastRowNum(); rowIndex++) { + Row row = sheet.getRow(rowIndex); + if (row == null) { + continue; + } + boolean centerUnitName = rowIndex == UNDERTAKE_UNIT_SECOND_TITLE_ROW_INDEX; + for (int columnIndex = 0; columnIndex < UNDERTAKE_UNIT_EXPORT_COLUMN_COUNT; columnIndex++) { + Cell cell = row.getCell(columnIndex); + if (cell == null) { + cell = row.createCell(columnIndex); + } + CellStyle sourceStyle = cell.getCellStyle(); + String styleKey = sourceStyle.getIndex() + ":" + centerUnitName; + CellStyle borderedStyle = borderedStyles.get(styleKey); + if (borderedStyle == null) { + borderedStyle = workbook.createCellStyle(); + borderedStyle.cloneStyleFrom(sourceStyle); + borderedStyle.setBorderTop(BorderStyle.THIN); + borderedStyle.setBorderRight(BorderStyle.THIN); + borderedStyle.setBorderBottom(BorderStyle.THIN); + borderedStyle.setBorderLeft(BorderStyle.THIN); + if (centerUnitName) { + borderedStyle.setAlignment(HorizontalAlignment.CENTER); + borderedStyle.setVerticalAlignment(VerticalAlignment.CENTER); + borderedStyle.setFont(unitNameFont); + } + borderedStyles.put(styleKey, borderedStyle); + } + cell.setCellStyle(borderedStyle); + } + } + } + /** * 查找工作建议标记行,将承办单位表的全部单元格合并并设置为居中的分组标题。 */ diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/common/info.js b/src/main/resources/views/platform/zhgh/democratic/proposal/common/info.js index 57bbd251..279b2753 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/common/info.js +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/common/info.js @@ -56,7 +56,7 @@ const PROPOSAL_INFO = {
并案信息
- + @@ -76,7 +76,7 @@ const PROPOSAL_INFO = {
委员会成员意见
- +