|
|
@@ -1768,7 +1768,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}else{*///}
|
|
|
|
|
|
jdbcTemplate.execute(delSql);
|
|
|
- jdbcTemplate.execute(sqlInfo);
|
|
|
+ jdbcTemplate.execute(sqlInfo.replace("\\","\\\\"));
|
|
|
jdbcTemplate.execute(sb.toString());
|
|
|
|
|
|
transactionManager1.commit(transactionStatus);
|
|
|
@@ -1856,7 +1856,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
for (WbsFormElement element : elements) {
|
|
|
if(bh.containsKey(element.getEName())){
|
|
|
dataMap2.remove(element.getEKey());
|
|
|
- break;
|
|
|
}
|
|
|
}
|
|
|
return dataMap2;
|
|
|
@@ -5757,90 +5756,35 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- }
|
|
|
- // 组装电签设置
|
|
|
- QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
|
|
|
- queryWrapper.select("col_key", "id");
|
|
|
- queryWrapper.in("type", 2, 6);
|
|
|
- queryWrapper.eq("tab_id", wbsTreePrivate.getPKeyId());
|
|
|
- List<TextdictInfo> textdictInfos = textdictInfoService.getBaseMapper().selectList(queryWrapper);
|
|
|
- String dqSql = "select e_key,GROUP_CONCAT(DISTINCT concat('*✹',id)) ids from u_sign_key_role_info where tab_en_name='" + wbsTreePrivate.getInitTableName() + "' GROUP BY e_key";
|
|
|
- List<Map<String, Object>> mapList = jdbcTemplate.queryForList(dqSql);
|
|
|
- if(!mapList.isEmpty()){
|
|
|
- for(Map<String, Object> map : mapList) {
|
|
|
- Elements elementsBy = table.getElementsByAttributeValueStarting("keyname", map.get("e_key") + "__");
|
|
|
- if(elementsBy!=null && !elementsBy.isEmpty()){
|
|
|
- String ids = map.get("ids").toString();
|
|
|
- ids = ids.replace(",","");
|
|
|
- String[] split = ids.split("\\*✹");
|
|
|
- for(Element element : elementsBy){
|
|
|
- for (String s : split) {
|
|
|
- if (s.isEmpty()) {
|
|
|
- continue;
|
|
|
- }
|
|
|
- try {
|
|
|
- TextdictInfo info = new TextdictInfo();
|
|
|
- info.setColKey(element.attr("keyname"));
|
|
|
- info.setId(Long.parseLong(s));
|
|
|
- info.setType(-1);
|
|
|
- textdictInfos.add(info);
|
|
|
- } catch (Exception e) {
|
|
|
- e.printStackTrace();
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- if (textdictInfos != null && !textdictInfos.isEmpty()) {
|
|
|
- for (TextdictInfo e : textdictInfos) {
|
|
|
- String key = e.getColKey();
|
|
|
- String[] keys = key.split("__");
|
|
|
- String[] trtd = keys[1].split("_");
|
|
|
- if (Integer.parseInt(trtd[0]) < trs.size()) {
|
|
|
- Element ytzData = trs.get(Integer.parseInt(trtd[0]));
|
|
|
- if (ytzData != null) {
|
|
|
- Elements tdsx = ytzData.select("td");
|
|
|
- if (Integer.parseInt(trtd[1]) < tdsx.size()) {
|
|
|
- Element data = ytzData.select("td").get(Integer.parseInt(trtd[1]));
|
|
|
- if (data.html().contains("el-tooltip")) {
|
|
|
- data = data.children().get(0);
|
|
|
- }
|
|
|
|
|
|
- int x1 = Integer.parseInt(data.children().get(0).attr("x1"));
|
|
|
- if (x1 == 0) {
|
|
|
- x1 = 1;
|
|
|
- }
|
|
|
- int y1 = Integer.parseInt(data.children().get(0).attr("y1"));
|
|
|
-
|
|
|
- Row row = sheet.getRow(y1 - 1);
|
|
|
- if (row != null) {
|
|
|
- Cell cell = sheet.getRow(y1 - 1).getCell(x1 - 1);
|
|
|
- if (cell != null) {
|
|
|
- short fontIndex = cell.getCellStyle().getFontIndex();
|
|
|
- Font oldfontAt = workbook.getFontAt(fontIndex);
|
|
|
-
|
|
|
- Font redFont = workbook.createFont();
|
|
|
- redFont.setColor(IndexedColors.WHITE.getIndex()); //设置字体颜色
|
|
|
- redFont.setFontHeightInPoints(Short.valueOf("1"));//设置字体大小
|
|
|
- redFont.setFontName(oldfontAt.getFontName());//设置字体
|
|
|
-
|
|
|
- CellStyle newStyle = workbook.createCellStyle(); //创建单元格样式
|
|
|
- newStyle.cloneStyleFrom(cell.getCellStyle());
|
|
|
- newStyle.setFont(redFont);
|
|
|
- cell.setCellStyle(newStyle);
|
|
|
- String id = e.getId() + "";
|
|
|
- if (e.getType() != null && e.getType() == -1) {
|
|
|
- id = "✹" + id;
|
|
|
- }
|
|
|
- if (cell.getCellTypeEnum() == CellType.STRING && StringUtil.hasText(cell.getStringCellValue())) {
|
|
|
- id = cell.getStringCellValue() + "*" + id;
|
|
|
- }
|
|
|
- cell.setCellValue(id);
|
|
|
- } else {
|
|
|
- ObjectUtils.isNotEmpty(cell);
|
|
|
- }
|
|
|
+ // 组装电签设置
|
|
|
+ Elements dqids = table.getElementsByAttribute("dqid");
|
|
|
+ for (Element element : dqids) {
|
|
|
+ String dqid = element.attr("dqid");
|
|
|
+ Elements x11 = element.getElementsByAttribute("x1");
|
|
|
+ if (x11 != null && x11.size() >= 1) {
|
|
|
+ Element element1 = x11.get(x11.size() - 1);
|
|
|
+ int x1 = Func.toInt(element1.attr("x1"));
|
|
|
+ int y1 = Func.toInt(element1.attr("y1"));
|
|
|
+
|
|
|
+ Row row = sheet.getRow(y1 - 1);
|
|
|
+ if (row != null) {
|
|
|
+ Cell cell = row.getCell(x1 - 1);
|
|
|
+ if (cell != null || ObjectUtils.isNotEmpty(cell)) {
|
|
|
+ short fontIndex = cell.getCellStyle().getFontIndex();
|
|
|
+ Font oldfontAt = workbook.getFontAt(fontIndex);
|
|
|
+ Font redFont = workbook.createFont();
|
|
|
+ redFont.setColor(IndexedColors.WHITE.getIndex()); //设置字体颜色
|
|
|
+ redFont.setFontHeightInPoints(Short.valueOf("1"));//设置字体大小
|
|
|
+ redFont.setFontName(oldfontAt.getFontName());//设置字体
|
|
|
+ String CellValue = cell.getStringCellValue().trim();
|
|
|
+
|
|
|
+ CellStyle newStyle = workbook.createCellStyle(); //创建单元格样式
|
|
|
+ newStyle.cloneStyleFrom(cell.getCellStyle());
|
|
|
+ newStyle.setFont(redFont);
|
|
|
+ newStyle.setShrinkToFit(true);
|
|
|
+ cell.setCellStyle(newStyle);
|
|
|
+ cell.setCellValue(dqid);
|
|
|
}
|
|
|
}
|
|
|
}
|