Browse Source

数据修改

zhuwei 2 months ago
parent
commit
e1fc8d15f3
17 changed files with 502 additions and 77 deletions
  1. 1 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsParam.java
  2. 7 0
      blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/PDFIndexInfo.java
  3. 16 9
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java
  4. 3 7
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/EVisaController.java
  5. 2 2
      blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVisaServiceImpl.java
  6. 19 25
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  7. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsParamController.java
  8. 0 17
      blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ExcelTabClientImpl.java
  9. 0 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ProjectAssignmentUserClientImpl.java
  10. 8 3
      blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java
  11. 4 4
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeContractMapper.xml
  12. 0 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  13. 0 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaDaoImpl.java
  14. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java
  15. 22 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/PdfAddimgUtil.java
  16. 32 2
      blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java
  17. 386 0
      blade-service/blade-meter/src/main/java/org/springblade/meter/utils/PdfAddimgUtil.java

+ 1 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/entity/WbsParam.java

@@ -20,6 +20,7 @@ public class WbsParam extends BaseEntity {
     private String v;
     private String v;
     private String remark;
     private String remark;
     private Integer type;
     private Integer type;
+    private Integer sort;
 
 
     /**
     /**
      * WBS树节点Id
      * WBS树节点Id

+ 7 - 0
blade-service-api/blade-manager-api/src/main/java/org/springblade/manager/vo/PDFIndexInfo.java

@@ -3,6 +3,8 @@ package org.springblade.manager.vo;
 import io.swagger.annotations.ApiModelProperty;
 import io.swagger.annotations.ApiModelProperty;
 import lombok.Data;
 import lombok.Data;
 
 
+import java.util.List;
+
 @Data
 @Data
 public class PDFIndexInfo {
 public class PDFIndexInfo {
 
 
@@ -10,4 +12,9 @@ public class PDFIndexInfo {
     String pkeyid;
     String pkeyid;
     @ApiModelProperty(value = "pdf坐标位置")
     @ApiModelProperty(value = "pdf坐标位置")
     float[] dataInfo;
     float[] dataInfo;
+
+    @ApiModelProperty(value = "原始坐标集合")
+    List<float[]> listData;
+
+
 }
 }

+ 16 - 9
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -1301,7 +1301,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 if (recordNos.size() == 0 || ObjectUtil.isEmpty(recordNos)) {
                 if (recordNos.size() == 0 || ObjectUtil.isEmpty(recordNos)) {
                     maxRecordNo = "0001";
                     maxRecordNo = "0001";
                 } else {
                 } else {
-                    List<String> numberRecordNos = new ArrayList<>();
+                   /* List<String> numberRecordNos = new ArrayList<>();
                     for (String recordNo : recordNos) {
                     for (String recordNo : recordNos) {
                         String number = recordNo.split("-")[recordNo.split("-").length - 1];
                         String number = recordNo.split("-")[recordNo.split("-").length - 1];
                         numberRecordNos.add(number);
                         numberRecordNos.add(number);
@@ -1311,8 +1311,11 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         maxRecordNo = spUtils.buildSerial(maxRecordNo1, 4);
                         maxRecordNo = spUtils.buildSerial(maxRecordNo1, 4);
                     } else {
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
-                    }
+                    }*/
+
+                    maxRecordNo = recordNos.size()+"";
                 }
                 }
+
             }
             }
 
 
             String maxReportNo = "";
             String maxReportNo = "";
@@ -1322,7 +1325,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 if (reportNos.size() == 0 || ObjectUtil.isEmpty(reportNos)) {
                 if (reportNos.size() == 0 || ObjectUtil.isEmpty(reportNos)) {
                     maxReportNo = "0001";
                     maxReportNo = "0001";
                 } else {
                 } else {
-                    List<String> numberReportNo = new ArrayList<>();
+                    /*List<String> numberReportNo = new ArrayList<>();
                     for (String reportNo : reportNos) {
                     for (String reportNo : reportNos) {
                         String number = reportNo.split("-")[reportNo.split("-").length - 1];
                         String number = reportNo.split("-")[reportNo.split("-").length - 1];
                         numberReportNo.add(number);
                         numberReportNo.add(number);
@@ -1332,7 +1335,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         maxReportNo = spUtils.buildSerial(maxReportNo1, 4);
                         maxReportNo = spUtils.buildSerial(maxReportNo1, 4);
                     } else {
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
-                    }
+                    }*/
+                    maxReportNo = reportNos.size()+"";
+
                 }
                 }
             }
             }
 
 
@@ -1373,9 +1378,9 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 if (recordNos.size() == 0 || ObjectUtil.isEmpty(recordNos)) {
                 if (recordNos.size() == 0 || ObjectUtil.isEmpty(recordNos)) {
                     maxRecordNo = "0001";
                     maxRecordNo = "0001";
                 } else {
                 } else {
-                    List<String> numberRecordNos = new ArrayList<>();
+                    /*List<String> numberRecordNos = new ArrayList<>();
                     for (String recordNo : recordNos) {
                     for (String recordNo : recordNos) {
-                        String number = recordNo.split("-")[recordNo.split("-").length - 1];
+                        String number = (recordNo.split("-")[recordNo.split("-").length - 1]).replaceAll("]","");
                         numberRecordNos.add(number);
                         numberRecordNos.add(number);
                     }
                     }
                     int maxRecordNo1 = Integer.parseInt(Collections.max(numberRecordNos)) + 1;
                     int maxRecordNo1 = Integer.parseInt(Collections.max(numberRecordNos)) + 1;
@@ -1383,7 +1388,8 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         maxRecordNo = spUtils.buildSerial(maxRecordNo1, 4);
                         maxRecordNo = spUtils.buildSerial(maxRecordNo1, 4);
                     } else {
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
-                    }
+                    }*/
+                    maxRecordNo = recordNos.size()+"";
                 }
                 }
 
 
                 WbsTreePrivate wbsTreePrivate = wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(String.valueOf(dto.getNodeId()))).stream().findAny().orElse(null);
                 WbsTreePrivate wbsTreePrivate = wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(String.valueOf(dto.getNodeId()))).stream().findAny().orElse(null);
@@ -1412,7 +1418,7 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                 if (reportNos.size() == 0 || ObjectUtil.isEmpty(reportNos)) {
                 if (reportNos.size() == 0 || ObjectUtil.isEmpty(reportNos)) {
                     maxReportNo = "0001";
                     maxReportNo = "0001";
                 } else {
                 } else {
-                    List<String> numberReportNo = new ArrayList<>();
+                   /* List<String> numberReportNo = new ArrayList<>();
                     for (String reportNo : reportNos) {
                     for (String reportNo : reportNos) {
                         String number = reportNo.split("-")[reportNo.split("-").length - 1];
                         String number = reportNo.split("-")[reportNo.split("-").length - 1];
                         numberReportNo.add(number);
                         numberReportNo.add(number);
@@ -1422,7 +1428,8 @@ public class TrialSelfInspectionRecordServiceImpl extends BaseServiceImpl<TrialS
                         maxReportNo = spUtils.buildSerial(maxReportNo1, 4);
                         maxReportNo = spUtils.buildSerial(maxReportNo1, 4);
                     } else {
                     } else {
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
                         throw new ServiceException("当前编号已达到最大值9999,操作失败");
-                    }
+                    }*/
+                    maxReportNo = reportNos.size()+"";
                 }
                 }
 
 
                 WbsTreePrivate wbsTreePrivate = wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(String.valueOf(dto.getNodeId()))).stream().findAny().orElse(null);
                 WbsTreePrivate wbsTreePrivate = wbsTreePrivateClient.queryByPKeyIds(Func.toStrList(String.valueOf(dto.getNodeId()))).stream().findAny().orElse(null);

+ 3 - 7
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/controller/EVisaController.java

@@ -15,6 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.data.redis.core.StringRedisTemplate;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.scheduling.annotation.Scheduled;
+import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
@@ -63,7 +64,7 @@ public class EVisaController {
         //执行代码
         //执行代码
         log.info("扫描开始");
         log.info("扫描开始");
         //String sql = "SELECT * from u_task_batch where json_data like '%1821798868568768512%' and is_deleted<>5  LIMIT 10";
         //String sql = "SELECT * from u_task_batch where json_data like '%1821798868568768512%' and is_deleted<>5  LIMIT 10";
-        String sql = "SELECT * from u_task_batch where is_deleted<>5 LIMIT 5";
+        String sql = "SELECT * from u_task_batch where is_deleted<>5 LIMIT 10";
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps != null && maps.size() >= 1) {
         if (maps != null && maps.size() >= 1) {
             for (Map<String, Object> dataInfo : maps) {
             for (Map<String, Object> dataInfo : maps) {
@@ -98,12 +99,12 @@ public class EVisaController {
         System.out.println("完成数量" + executor.getCompletedTaskCount());
         System.out.println("完成数量" + executor.getCompletedTaskCount());
     }
     }
 
 
+    @Transactional
     public void checkIsExsitTaskBatch(TaskApprovalVO taskApprovalVO){
     public void checkIsExsitTaskBatch(TaskApprovalVO taskApprovalVO){
         if ("OK".equals(taskApprovalVO.getFlag())) { // 同意
         if ("OK".equals(taskApprovalVO.getFlag())) { // 同意
             // 调用电签接口
             // 调用电签接口
             String eVisaStatus = eVisaService.eVisa(JSONObject.parseObject(JSONObject.toJSONString(taskApprovalVO), EVisaTaskApprovalVO.class));
             String eVisaStatus = eVisaService.eVisa(JSONObject.parseObject(JSONObject.toJSONString(taskApprovalVO), EVisaTaskApprovalVO.class));
 
 
-
             if (eVisaStatus == null || StringUtils.isEmpty(eVisaStatus)) {
             if (eVisaStatus == null || StringUtils.isEmpty(eVisaStatus)) {
                 //状态改为 == 4 --
                 //状态改为 == 4 --
 
 
@@ -127,10 +128,6 @@ public class EVisaController {
                 List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
                 List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
                 if (maps == null || maps.size() == 0) {
                 if (maps == null || maps.size() == 0) {
                     // 最后修改计量数据
                     // 最后修改计量数据
-                    /*if(masterTask !=null && (masterTask.getApprovalType()==5 || masterTask.getApprovalType()==6 || masterTask.getApprovalType()==7 ) && masterTask.getFixedFlowId()!=null && masterTask.getFixedFlowId()!=0L ){
-                        String upsql = "update u_task_parallel set status=2 ,e_visa_status=1,e_visa_content='电签成功' ,update_time=SYSDATE()  where sort in(SELECT fixed_flow_branch_sort from u_fixed_flow_link where fixed_flow_id ="+masterTask.getFixedFlowId()+" and  flow_task_type=2 ) and process_instance_id="+masterTask.getProcessInstanceId()+"";
-                        jdbcTemplate.execute(upsql);
-                    }*/
 
 
                     //说明都审批完成,将主表状态更改为已完成
                     //说明都审批完成,将主表状态更改为已完成
                     String finalPdfUrl = null;
                     String finalPdfUrl = null;
@@ -198,7 +195,6 @@ public class EVisaController {
             jdbcTemplate.execute(up_task);
             jdbcTemplate.execute(up_task);
             jdbcTemplate.execute("update u_information_query set e_visa_pdf_url='',status=0 where id='"+taskApprovalVO.getFormDataId()+"'");
             jdbcTemplate.execute("update u_information_query set e_visa_pdf_url='',status=0 where id='"+taskApprovalVO.getFormDataId()+"'");
             RedisTemplate.delete("sign-" + taskApprovalVO.getFormDataId());
             RedisTemplate.delete("sign-" + taskApprovalVO.getFormDataId());
-
             //委托单
             //委托单
             if (taskApprovalVO.getApprovalType()==8) {
             if (taskApprovalVO.getApprovalType()==8) {
                 this.jdbcTemplate.execute("update u_entrust_info set status=1 where id=(SELECT wbs_id from u_information_query where id='"+taskApprovalVO.getFormDataId()+"')");
                 this.jdbcTemplate.execute("update u_entrust_info set status=1 where id=(SELECT wbs_id from u_information_query where id='"+taskApprovalVO.getFormDataId()+"')");

+ 2 - 2
blade-service/blade-e-visa/src/main/java/org/springblade/evisa/service/impl/EVisaServiceImpl.java

@@ -90,7 +90,7 @@ import java.util.stream.Collectors;
 @AllArgsConstructor
 @AllArgsConstructor
 public class EVisaServiceImpl implements EVisaService {
 public class EVisaServiceImpl implements EVisaService {
 
 
-    //private static final String SIGN_HOST = "172.30.224.79";
+   // private static final String SIGN_HOST = "172.30.224.79";
     private static final String SIGN_HOST = "47.115.117.246";
     private static final String SIGN_HOST = "47.115.117.246";
 
 
     private static final String SIGN_PORT = "8183";
     private static final String SIGN_PORT = "8183";
@@ -1006,7 +1006,7 @@ public class EVisaServiceImpl implements EVisaService {
                             imageData = ImageUtil.resizeImage(imageData, 540, 540);
                             imageData = ImageUtil.resizeImage(imageData, 540, 540);
                         } else {
                         } else {
                             //非合同章
                             //非合同章
-                            imageData = ImageUtil.resizeImage(imageData, 480, 132);
+                            imageData = ImageUtil.resizeImage(imageData, 400, 200);
                         }
                         }
                     }
                     }
 
 

+ 19 - 25
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -21,6 +21,9 @@ import lombok.SneakyThrows;
 import org.apache.commons.codec.Charsets;
 import org.apache.commons.codec.Charsets;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang.StringUtils;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.commons.lang3.ObjectUtils;
+import org.apache.poi.ss.usermodel.Cell;
+import org.apache.poi.ss.usermodel.IndexedColors;
+import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.WorkbookFactory;
 import org.apache.poi.ss.usermodel.WorkbookFactory;
 import org.jsoup.Jsoup;
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Document;
@@ -2467,32 +2470,23 @@ public class ExcelTabController extends BladeController {
                         }
                         }
                     }
                     }
                     // 组装电签设置
                     // 组装电签设置
-                    QueryWrapper<TextdictInfo> queryWrapper = new QueryWrapper<>();
-                    queryWrapper.eq("type", 2);
-                    queryWrapper.eq("tab_id", tableNode.getPKeyId());
-
-                    final List<TextdictInfo> textdictInfos = this.textdictInfoService.getBaseMapper().selectList(queryWrapper);
-                    if (textdictInfos != null && !textdictInfos.isEmpty()) {
-                        textdictInfos.forEach(e -> {
-                            String key = e.getColKey();
-                            String[] keys = key.split("__");
-                            String[] trtd = keys[1].split("_");
-                            if (trs.size() > (Integer.parseInt(trtd[0]))) {
-                                Element trData = trs.get(Integer.parseInt(trtd[0]));
-                                Elements tdDatas = trData.select("td");
-                                if (tdDatas.size() > Integer.parseInt(trtd[1])) {
-                                    Element data = tdDatas.get(Integer.parseInt(trtd[1]));
-                                    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"));
-                                    final CellRange cellRange = sheet.getCellRange(y1, x1);
-                                    cellRange.setText(e.getId() + "");
-                                    cellRange.getCellStyle().getFont().setColor(Color.white);
-                                }
+                    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"));
+
+                            CellRange cellRange = sheet.getCellRange(y1, x1);
+                            if (cellRange != null) {
+                                // 创建字体
+                                cellRange.setText(dqid);
+                                cellRange.getCellStyle().getExcelFont().setSize(1);
+                                cellRange.getCellStyle().getExcelFont().setColor(Color.WHITE);
                             }
                             }
-                        });
+                        }
                     }
                     }
 
 
                     Long fileName = SnowFlakeUtil.getId();
                     Long fileName = SnowFlakeUtil.getId();

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/WbsParamController.java

@@ -250,7 +250,7 @@ public class WbsParamController {
     @ApiOperation(value = "获取名称字典", notes = "获取名称字典")
     @ApiOperation(value = "获取名称字典", notes = "获取名称字典")
     @GetMapping("/keymap")
     @GetMapping("/keymap")
     public R<List<WbsParamBean>> list2() {
     public R<List<WbsParamBean>> list2() {
-        LambdaQueryWrapper<WbsParam> queryWrapper = Wrappers.<WbsParam>query().lambda().eq(WbsParam::getType, 0).orderByDesc(WbsParam::getCreateTime);
+        LambdaQueryWrapper<WbsParam> queryWrapper = Wrappers.<WbsParam>query().lambda().eq(WbsParam::getType, 0).orderByDesc(WbsParam::getSort,WbsParam::getCreateTime);
         List<WbsParamBean> list = new ArrayList<>();
         List<WbsParamBean> list = new ArrayList<>();
         List<WbsParam> data = this.service.list(queryWrapper);
         List<WbsParam> data = this.service.list(queryWrapper);
         if (CollectionUtil.isNotEmpty(data)) {
         if (CollectionUtil.isNotEmpty(data)) {

+ 0 - 17
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ExcelTabClientImpl.java

@@ -73,23 +73,6 @@ public class ExcelTabClientImpl implements ExcelTabClient {
         String projectId = table.getString("projectId");
         String projectId = table.getString("projectId");
         String contractId = table.getString("contractId");
         String contractId = table.getString("contractId");
 
 
-    //    List<WbsTreePrivateVO4> wbsTreePrivateVO4s = wbsTreePrivateService.searchNodeAllTable(nodeId, type + "", "1", contractId, projectId, 0, id);
-/*        for (WbsTreePrivateVO4 treePrivate : wbsTreePrivateVO4s) {
-            if (tabIds.indexOf(treePrivate.getPKeyId() + "") < 0) {
-                List<Map<String, Object>> bussDataInfoTrial = excelTabService.getBussDataInfoTrial(id, treePrivate.getPKeyId(), Long.parseLong(contractId));
-                Map<String, Object> dataInfo = bussDataInfoTrial.get(0);
-                dataInfo.put("pkeyId", treePrivate.getPKeyId());
-                dataInfo.put("projectId", treePrivate.getProjectId());
-                dataInfo.put("type", 1);
-                dataInfo.put("isBussShow", 1);
-                dataInfo.put("nodeId", nodeId);
-                dataInfo.put("contractId", contractId);
-                dataInfo.put("oper", true);
-                dataInfo.put("isCollapseLoad", true);
-                dataArray.add(dataInfo);
-            }
-        }*/
-
         //应用抽取的数据
         //应用抽取的数据
         dataArray = excelTabService.addLoadDataInfo(dataArray);
         dataArray = excelTabService.addLoadDataInfo(dataArray);
 
 

+ 0 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/feign/ProjectAssignmentUserClientImpl.java

@@ -2,7 +2,6 @@ package org.springblade.manager.feign;
 
 
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.AllArgsConstructor;
 import lombok.AllArgsConstructor;
-import org.apache.commons.lang.StringUtils;
 import org.springblade.manager.dto.SaveUserInfoByProjectDTO;
 import org.springblade.manager.dto.SaveUserInfoByProjectDTO;
 import org.springblade.manager.entity.ContractInfo;
 import org.springblade.manager.entity.ContractInfo;
 import org.springblade.manager.entity.ContractRelationJlyz;
 import org.springblade.manager.entity.ContractRelationJlyz;

+ 8 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -1857,11 +1857,13 @@ public class ExecutorMeter extends FormulaExecutor {
                     monthlySum.addAll(0,Collections.nCopies(offset,""));
                     monthlySum.addAll(0,Collections.nCopies(offset,""));
                     monthlyCount.addAll(0,Collections.nCopies(offset,""));
                     monthlyCount.addAll(0,Collections.nCopies(offset,""));
                 }
                 }
+
+                //累计实际完成
                 FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_22").ifPresent(t->{
                 FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_22").ifPresent(t->{
                     elementWriter.write(t,monthlySum);
                     elementWriter.write(t,monthlySum);
                 });
                 });
 
 
-
+                //本月实际完成
                 FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_23").ifPresent(t->{
                 FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_23").ifPresent(t->{
                     elementWriter.write(t,monthlyCount);
                     elementWriter.write(t,monthlyCount);
                 });
                 });
@@ -1900,18 +1902,21 @@ public class ExecutorMeter extends FormulaExecutor {
                     }).collect(Collectors.toList());
                     }).collect(Collectors.toList());
 
 
                     List<String> finalPlanMonthSum = planMonthSum;
                     List<String> finalPlanMonthSum = planMonthSum;
+                    //key_27 计划累计实际完成
                     FormulaUtils.elementFindByCode(fdm, ConstructionSchedule.TBN + ":key_27").ifPresent(t -> {
                     FormulaUtils.elementFindByCode(fdm, ConstructionSchedule.TBN + ":key_27").ifPresent(t -> {
                         elementWriter.write(t, finalPlanMonthSum);
                         elementWriter.write(t, finalPlanMonthSum);
                     });
                     });
-
                 }
                 }
+
+               // tec.getMeterInfo()/
+
                 /*上传图标*/
                 /*上传图标*/
                 try {
                 try {
                     String path=FormulaUtils.chapterScheduleChartUrl(actualMap,plannedMap,planStartDate.getYear(),planEndDate.getYear());
                     String path=FormulaUtils.chapterScheduleChartUrl(actualMap,plannedMap,planStartDate.getYear(),planEndDate.getYear());
                     BladeFile chartFile= tec.getNewIOSSClient().uploadFile( ConstructionSchedule.TBN+ SnowFlakeUtil.getId() + ".png",path);
                     BladeFile chartFile= tec.getNewIOSSClient().uploadFile( ConstructionSchedule.TBN+ SnowFlakeUtil.getId() + ".png",path);
                     /*施工进度图*/
                     /*施工进度图*/
                     FormulaUtils.elementFindByCode(fdm, ConstructionSchedule.TBN + ":key_29").ifPresent(t -> {
                     FormulaUtils.elementFindByCode(fdm, ConstructionSchedule.TBN + ":key_29").ifPresent(t -> {
-                        elementWriter.write(t, chartFile.getLink());
+                        elementWriter.write(t, actualMap);
                     });
                     });
                 }catch (Exception e){
                 }catch (Exception e){
                     e.printStackTrace();
                     e.printStackTrace();

+ 4 - 4
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/WbsTreeContractMapper.xml

@@ -848,13 +848,13 @@
     </select>
     </select>
 
 
     <select id="apiTreeNodeHzrc" resultMap="apiTreeNodeHzrcResultMap">
     <select id="apiTreeNodeHzrc" resultMap="apiTreeNodeHzrcResultMap">
-        select distinct a.p_key_id , a.id , a.parent_id , a.node_name ,1 as isMea, b.e_visa_pdf_url as fileUrl,
-                        (SELECT count(1) from u_task a ,u_task_parallel b,m_project_assignment_user c  where a.process_instance_id = b.process_instance_id and b.task_user = c.user_id and c.role_id in(
-                            SELECT id from blade_role where role_name like  '监理员%' and is_deleted=0) and c.contract_id=#{contractId} and a.form_data_id=b.id)
+        select distinct a.p_key_id , a.id , a.parent_id , a.node_name , b.e_visa_pdf_url as fileUrl,
+                        (SELECT count(1) from u_task e ,u_task_parallel f,m_project_assignment_user g  where e.process_instance_id = f.process_instance_id and f.task_user = g.user_id and g.role_id in(
+                            SELECT id from blade_role where role_name like  '监理员%' and is_deleted=0) and g.contract_id=1792792387901288450 and e.form_data_id=b.id )
                         AS isMea,
                         AS isMea,
                         a.partition_Code as partitionCode,
                         a.partition_Code as partitionCode,
                         b.taskStatus
                         b.taskStatus
-        from m_wbs_tree_contract a LEFT JOIN (SELECT c.e_visa_pdf_url ,d.`status` as taskStatus,c.wbs_id from u_information_query c,u_task d where d.form_data_id=c.id and  c.contract_id = #{contractId} and c.classify = #{classType})  b on a.p_key_id = b.wbs_id
+        from m_wbs_tree_contract a LEFT JOIN (SELECT c.e_visa_pdf_url ,d.`status` as taskStatus,c.wbs_id ,,d.id from u_information_query c,u_task d where d.form_data_id=c.id and  c.contract_id = #{contractId} and c.classify = #{classType})  b on a.p_key_id = b.wbs_id
         where
         where
             a.is_deleted = 0
             a.is_deleted = 0
           and a.status = 1
           and a.status = 1

+ 0 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -2348,8 +2348,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                     this.setFirstData(dataInfo2, tableInfo);
                     this.setFirstData(dataInfo2, tableInfo);
                     //设置日志信息
                     //设置日志信息
                     this.setTheLogData(dataInfo2, tableInfo);
                     this.setTheLogData(dataInfo2, tableInfo);
-
-
                 }
                 }
                 tableInfo.setContractId(dataInfo2.getString("contractId"));
                 tableInfo.setContractId(dataInfo2.getString("contractId"));
 
 

+ 0 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaDaoImpl.java

@@ -1,6 +1,5 @@
 package org.springblade.manager.service.impl;
 package org.springblade.manager.service.impl;
 
 
-import com.mixsmart.utils.CustomFunction;
 import com.mixsmart.utils.StringUtils;
 import com.mixsmart.utils.StringUtils;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import org.springblade.common.utils.BaseUtils;
 import org.springblade.common.utils.BaseUtils;
@@ -21,7 +20,6 @@ import org.springframework.stereotype.Service;
 
 
 import java.time.format.DateTimeFormatter;
 import java.time.format.DateTimeFormatter;
 import java.util.*;
 import java.util.*;
-import java.util.function.BiFunction;
 import java.util.function.Function;
 import java.util.function.Function;
 
 
 /**
 /**

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/FormulaServiceImpl.java

@@ -3024,7 +3024,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
             }
             }
             return Jsoup.parse(IoUtil.readToString(inputStreamByUrl));
             return Jsoup.parse(IoUtil.readToString(inputStreamByUrl));
          },(v1,v2)->v2));
          },(v1,v2)->v2));
-        /*元素绑定单元格信息*/
+        /*元素绑定单元格信息(坐标位置)*/
         Map<String,Map<String,String>> coordinateMap = new HashMap<>();
         Map<String,Map<String,String>> coordinateMap = new HashMap<>();
         /*电签关键字和坐标*/
         /*电签关键字和坐标*/
         Map<String,Map<String,String>> eSignMaps=new HashMap<>();
         Map<String,Map<String,String>> eSignMaps=new HashMap<>();

+ 22 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/PdfAddimgUtil.java

@@ -168,7 +168,28 @@ public class PdfAddimgUtil {
         return result;
         return result;
     }
     }
 
 
-    private static List<PdfPageContentPositions> getPdfContentPostionsList(
+    /**
+     * findKeywordPostions
+     *
+     * @param pdfData
+     * @return List<float [ ]> : float[0]:pageNum float[1]:x float[2]:y
+     * @throws IOException
+     */
+    public static List<PDFIndexInfo> findAllwordPostions(byte[] pdfData) throws IOException {
+        List<PDFIndexInfo> result = new ArrayList<PDFIndexInfo>();
+        List<PdfPageContentPositions> pdfPageContentPositions = getPdfContentPostionsList(pdfData);
+
+        for (PdfPageContentPositions pdfPageContentPosition : pdfPageContentPositions) {
+            PDFIndexInfo pdfIndexInfo = new PDFIndexInfo();
+            pdfIndexInfo.setListData(pdfPageContentPosition.getPositions());
+            pdfIndexInfo.setPkeyid(pdfPageContentPosition.getContent());
+            result.add(pdfIndexInfo);
+        }
+        return result;
+    }
+
+
+    static List<PdfPageContentPositions> getPdfContentPostionsList(
             byte[] pdfData) throws IOException {
             byte[] pdfData) throws IOException {
         PdfReader reader = new PdfReader(pdfData);
         PdfReader reader = new PdfReader(pdfData);
 
 

+ 32 - 2
blade-service/blade-meter/src/main/java/org/springblade/meter/controller/TaskController.java

@@ -79,6 +79,7 @@ import org.springblade.meter.service.IMaterialStartStatementService;
 import org.springblade.meter.service.ITaskRepealMessageService;
 import org.springblade.meter.service.ITaskRepealMessageService;
 import org.springblade.meter.service.impl.*;
 import org.springblade.meter.service.impl.*;
 import org.springblade.meter.utils.CollectionUtils;
 import org.springblade.meter.utils.CollectionUtils;
+import org.springblade.meter.utils.CreateDashedLine;
 import org.springblade.meter.utils.FileUtils;
 import org.springblade.meter.utils.FileUtils;
 import org.springblade.meter.vo.*;
 import org.springblade.meter.vo.*;
 import org.springblade.resource.feign.NewIOSSClient;
 import org.springblade.resource.feign.NewIOSSClient;
@@ -3745,7 +3746,6 @@ public class TaskController extends BladeController {
                         PdfCopy pdfCopy = new PdfCopy(doc, new FileOutputStream(rs.getPdfPath()));
                         PdfCopy pdfCopy = new PdfCopy(doc, new FileOutputStream(rs.getPdfPath()));
                         int pageCount;
                         int pageCount;
                         doc.open();
                         doc.open();
-                        /* String tile = rs.getName().contains("封面") ? projectName : projectName + StringPool.DASH + rs.getName();*/
                         String title = rs.createTitle(projectName);
                         String title = rs.createTitle(projectName);
                         // 添加签字时间
                         // 添加签字时间
                         List<DqTime> dqTimes= dqTimeMap.get().get(rs.getPkeyId());
                         List<DqTime> dqTimes= dqTimeMap.get().get(rs.getPkeyId());
@@ -3858,9 +3858,39 @@ public class TaskController extends BladeController {
                         if (reader != null) reader.close();
                         if (reader != null) reader.close();
                         doc.close();
                         doc.close();
                         rs.setPdfOssPath(CompletableFuture.supplyAsync(() -> {
                         rs.setPdfOssPath(CompletableFuture.supplyAsync(() -> {
+                            String local = rs.getPdfPath();
                             String url = "无效链接";
                             String url = "无效链接";
                             try {
                             try {
-                                BladeFile bladeFile = newIOSSClient.uploadFile(rs.getName() + SnowFlakeUtil.getId() + ".pdf", rs.getPdfPath());
+                                if(rs.getPkeyId() == 1760845593422331904l){
+
+                                    Map<String, Object> dataMap = rs.getData().get(0);
+                                    // key_39 实际
+                                    String key39= rs.getCoordinateMap().get("key_39");
+                                    String[] split39 = key39.split(";");
+                                    // key_34 累计
+                                    String key34= rs.getCoordinateMap().get("key_34");
+                                    String[] split34 = key34.split(";");
+                                    List<String> list39 = new ArrayList<>();
+                                    for(String val39:split39){
+                                        String data39 = dataMap.get(val39) + "";
+                                        if(data39!=null && Func.isNotEmpty(data39)){
+                                            list39.add(data39);
+                                        }
+
+                                    }
+                                    CreateDashedLine.getPDFInfo(local,list39,"1");
+
+                                    List<String> list34 = new ArrayList<>();
+                                    for(String val34:split34){
+                                        String data34 = dataMap.get(val34) + "";
+                                        if(data34!=null && Func.isNotEmpty(data34)) {
+                                            list34.add(dataMap.get(val34) + "");
+                                        }
+                                    }
+                                    CreateDashedLine.getPDFInfo(local,list34,"2");
+                                }
+
+                                BladeFile bladeFile = newIOSSClient.uploadFile(rs.getName() + SnowFlakeUtil.getId() + ".pdf", local);
                                 url = bladeFile.getLink();
                                 url = bladeFile.getLink();
                             } catch (Exception e) {
                             } catch (Exception e) {
                                 e.printStackTrace();
                                 e.printStackTrace();

+ 386 - 0
blade-service/blade-meter/src/main/java/org/springblade/meter/utils/PdfAddimgUtil.java

@@ -0,0 +1,386 @@
+package org.springblade.meter.utils;
+
+import com.itextpdf.text.BaseColor;
+import com.itextpdf.text.Element;
+import com.itextpdf.text.Image;
+import com.itextpdf.text.Rectangle;
+import com.itextpdf.text.pdf.*;
+import com.itextpdf.text.pdf.parser.*;
+import org.springblade.common.constant.CommonConstant;
+import org.springblade.core.tool.utils.Func;
+import org.springblade.manager.entity.TextdictInfo;
+import org.springblade.manager.vo.PDFIndexInfo;
+import org.springblade.system.cache.ParamCache;
+
+import java.io.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+
+public class PdfAddimgUtil {
+
+    public static void pdfAddImgInfo(String pdfUrl, String keyword, Map<Long, TextdictInfo> textMap) throws Exception {
+        String file_path = FileUtils.getSysLocalFileUrl();
+        String signImg = file_path+"/print/241dc221f83929a87d55ce700d6a4cd7.png";
+
+        File pdfFile = new File(pdfUrl);
+        byte[] pdfData = new byte[(int) pdfFile.length()];
+        FileInputStream inputStream = null;
+        try {
+            inputStream = new FileInputStream(pdfFile);
+            inputStream.read(pdfData);
+        } catch (IOException e) {
+            throw e;
+        } finally {
+            if (inputStream != null) {
+                try {
+                    inputStream.close();
+                } catch (IOException e) {
+                    inputStream.close();
+                }
+            }
+        }
+
+
+        List<PDFIndexInfo> positions = findKeywordPostions(pdfData, keyword);
+
+        System.out.println("total:" + positions.size());
+        if (positions != null && positions.size() > 0) {
+
+            for (int i = 0; i < positions.size(); i++) {
+
+                PDFIndexInfo pdfIndexInfo = positions.get(i);
+                float[] position = pdfIndexInfo.getDataInfo();
+                TextdictInfo textdictInfo = textMap.get(Func.toLong(pdfIndexInfo.getPkeyid()));
+                float pyzbx = 0;
+                float pyzby = 0;
+                String type ="2";
+                if(textdictInfo!=null){
+                    pyzbx = Func.toFloat(textdictInfo.getPyzbx());
+                    pyzby = Func.toFloat(textdictInfo.getPyzby());
+                    type = textdictInfo.getType()+"";
+                }
+                gaizhang(pdfFile, new File(pdfUrl), (int) position[0], position[1], position[2], signImg,pyzbx,pyzby,type);
+            }
+        }
+    }
+
+    public static void gaizhang(File src, File dest, int page, float x, float y, String imagePath,float pyzbx,float pyzby,String type) throws Exception {
+        // 读取模板文件
+        InputStream input = new FileInputStream(src);
+        PdfReader reader = new PdfReader(input);
+        PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(dest));
+        Rectangle pageSize = reader.getPageSize(1);
+        float height = pageSize.getHeight();
+        float width = pageSize.getWidth();
+        if(type.equals("6")){
+            x = width * x - 27+pyzbx;
+            y = height - height * y - 30+pyzby;
+            imagePath = "/Users/hongchuangyanfa/Desktop/print/ht1234567890.png";
+        }else{
+            x = width * x - 20+pyzbx;
+            y = height - height * y - 8+pyzby;
+        }
+
+        // 读图片
+        Image image = Image.getInstance(imagePath);
+
+        // 获取操作的页面
+        PdfContentByte under = stamper.getOverContent(page);
+        // 添加图片
+
+        // 设置图片的新宽度和高度
+        float newWidth = 75f; // 新的宽度
+        float newHeight = image.getScaledHeight() * (newWidth / image.getScaledWidth()); // 根据宽度计算高度
+        image.scaleAbsolute(newWidth, newHeight); // 设置图片的新尺寸
+        //调整图片尺寸
+        image.setAbsolutePosition(x, y);
+        under.addImage(image);
+        // 假设的under.addImage方法,需要传入图片路径和大小参数
+        stamper.close();
+        reader.close();
+    }
+
+    /**
+     * 【功能描述:添加图片和文字水印】 【功能详细描述:功能详细描述】
+     *
+     * @param srcFile    待加水印文件
+     * @param destFile   加水印后存放地址
+     * @param text       加水印的文本内容
+     * @param textWidth  文字横坐标
+     * @param textHeight 文字纵坐标
+     * @throws Exception
+     */
+    public void addWaterMark(String srcFile, String destFile, String text,
+                             int textWidth, int textHeight) throws Exception {
+        // 待加水印的文件
+        PdfReader reader = new PdfReader(srcFile);
+        // 加完水印的文件
+        PdfStamper stamper = new PdfStamper(reader, new FileOutputStream(
+                destFile));
+        int total = reader.getNumberOfPages() + 1;
+        PdfContentByte content;
+        // 设置字体
+        BaseFont font = BaseFont.createFont();
+        // 循环对每页插入水印
+        for (int i = 1; i < total; i++) {
+            // 水印的起始
+            content = stamper.getUnderContent(i);
+            // 开始
+            content.beginText();
+            // 设置颜色 默认为蓝色
+            content.setColorFill(BaseColor.BLUE);
+            // content.setColorFill(Color.GRAY);
+            // 设置字体及字号
+            content.setFontAndSize(font, 38);
+            // 设置起始位置
+            // content.setTextMatrix(400, 880);
+            content.setTextMatrix(textWidth, textHeight);
+            // 开始写入水印
+            content.showTextAligned(Element.ALIGN_LEFT, text, textWidth,
+                    textHeight, 45);
+            content.endText();
+        }
+        stamper.close();
+    }
+
+    /**
+     * findKeywordPostions
+     *
+     * @param pdfData
+     * @param keyword
+     * @return List<float [ ]> : float[0]:pageNum float[1]:x float[2]:y
+     * @throws IOException
+     */
+    public static List<PDFIndexInfo> findKeywordPostions(byte[] pdfData,
+                                                    String keyword) throws IOException {
+        List<PDFIndexInfo> result = new ArrayList<PDFIndexInfo>();
+        List<PdfPageContentPositions> pdfPageContentPositions = getPdfContentPostionsList(pdfData);
+
+        for (PdfPageContentPositions pdfPageContentPosition : pdfPageContentPositions) {
+            List<PDFIndexInfo> charPositions = findPositions(keyword,
+                    pdfPageContentPosition);
+            if (charPositions == null || charPositions.size() < 1) {
+                continue;
+            }
+            result.addAll(charPositions);
+        }
+        return result;
+    }
+
+    /**
+     * findKeywordPostions
+     *
+     * @param pdfData
+     * @return List<float [ ]> : float[0]:pageNum float[1]:x float[2]:y
+     * @throws IOException
+     */
+    public static List<PDFIndexInfo> findAllwordPostions(byte[] pdfData) throws IOException {
+        List<PDFIndexInfo> result = new ArrayList<PDFIndexInfo>();
+        List<PdfPageContentPositions> pdfPageContentPositions = getPdfContentPostionsList(pdfData);
+
+        for (PdfPageContentPositions pdfPageContentPosition : pdfPageContentPositions) {
+            PDFIndexInfo pdfIndexInfo = new PDFIndexInfo();
+            pdfIndexInfo.setListData(pdfPageContentPosition.getPositions());
+            pdfIndexInfo.setPkeyid(pdfPageContentPosition.getContent());
+            result.add(pdfIndexInfo);
+        }
+        return result;
+    }
+
+
+    static List<PdfPageContentPositions> getPdfContentPostionsList(
+            byte[] pdfData) throws IOException {
+        PdfReader reader = new PdfReader(pdfData);
+
+        List<PdfPageContentPositions> result = new ArrayList<PdfPageContentPositions>();
+
+        int pages = reader.getNumberOfPages();
+        for (int pageNum = 1; pageNum <= pages; pageNum++) {
+            float width = reader.getPageSize(pageNum).getWidth();
+            float height = reader.getPageSize(pageNum).getHeight();
+
+            PdfRenderListener pdfRenderListener = new PdfRenderListener(
+                    pageNum, width, height);
+
+            // 解析pdf,定位位置
+            PdfContentStreamProcessor processor = new PdfContentStreamProcessor(
+                    pdfRenderListener);
+            PdfDictionary pageDic = reader.getPageN(pageNum);
+            PdfDictionary resourcesDic = pageDic.getAsDict(PdfName.RESOURCES);
+            try {
+                processor.processContent(ContentByteUtils
+                        .getContentBytesForPage(reader, pageNum), resourcesDic);
+            } catch (IOException e) {
+                reader.close();
+                throw e;
+            }
+
+            String content = pdfRenderListener.getContent();
+            List<CharPosition> charPositions = pdfRenderListener
+                    .getcharPositions();
+
+            List<float[]> positionsList = new ArrayList<float[]>();
+            for (CharPosition charPosition : charPositions) {
+                float[] positions = new float[]{charPosition.getPageNum(),
+                        charPosition.getX(), charPosition.getY()};
+                positionsList.add(positions);
+            }
+
+            PdfPageContentPositions pdfPageContentPositions = new PdfPageContentPositions();
+            pdfPageContentPositions.setContent(content);
+            pdfPageContentPositions.setPostions(positionsList);
+
+            result.add(pdfPageContentPositions);
+        }
+        reader.close();
+        return result;
+    }
+
+
+    private static List<PDFIndexInfo> findPositions(String keyword,
+                                                    PdfPageContentPositions pdfPageContentPositions) {
+
+        List<PDFIndexInfo> result =new ArrayList<>();
+        String content = pdfPageContentPositions.getContent();
+        List<float[]> charPositions = pdfPageContentPositions.getPositions();
+
+        List<String> strList = Func.toStrList(keyword);
+        for (String text : strList) {
+            for (int pos = 0; pos < content.length(); ) {
+                PDFIndexInfo data= new PDFIndexInfo();
+                int positionIndex = content.indexOf(text, pos);
+                if (positionIndex == -1) {
+                    break;
+                }
+                float[] postions = charPositions.get(positionIndex);
+                data.setDataInfo(postions);
+                data.setPkeyid(text);
+                result.add(data);
+                pos = positionIndex + 1;
+            }
+        }
+        return result;
+    }
+
+
+    private static class PdfPageContentPositions {
+        private String content;
+        private List<float[]> positions;
+
+        public String getContent() {
+            return content;
+        }
+
+        public void setContent(String content) {
+            this.content = content;
+        }
+
+        public List<float[]> getPositions() {
+            return positions;
+        }
+
+        public void setPostions(List<float[]> positions) {
+            this.positions = positions;
+        }
+    }
+
+    private static class PdfRenderListener implements RenderListener {
+        private int pageNum;
+        private float pageWidth;
+        private float pageHeight;
+        private StringBuilder contentBuilder = new StringBuilder();
+        private List<CharPosition> charPositions = new ArrayList<CharPosition>();
+
+        public PdfRenderListener(int pageNum, float pageWidth, float pageHeight) {
+            this.pageNum = pageNum;
+            this.pageWidth = pageWidth;
+            this.pageHeight = pageHeight;
+        }
+
+        @Override
+        public void beginTextBlock() {
+
+        }
+
+        @Override
+        public void renderText(TextRenderInfo renderInfo) {
+            List<TextRenderInfo> characterRenderInfos = renderInfo
+                    .getCharacterRenderInfos();
+            for (TextRenderInfo textRenderInfo : characterRenderInfos) {
+                String word = textRenderInfo.getText();
+                if (word.length() > 1) {
+                    word = word.substring(word.length() - 1, word.length());
+                }
+                com.itextpdf.awt.geom.Rectangle2D.Float rectangle = textRenderInfo.getAscentLine()
+                        .getBoundingRectange();
+                double x = rectangle.getMinX();
+                double y = rectangle.getMaxY();
+
+                float xPercent = Math.round(x / pageWidth * 10000) / 10000f;
+                float yPercent = Math.round((1 - y / pageHeight) * 10000) / 10000f;//
+
+                CharPosition charPosition = new CharPosition(pageNum, xPercent,
+                        yPercent);
+                charPositions.add(charPosition);
+                contentBuilder.append(word);
+            }
+        }
+
+        @Override
+        public void endTextBlock() {
+
+        }
+
+        @Override
+        public void renderImage(ImageRenderInfo renderInfo) {
+
+        }
+
+        public String getContent() {
+            return contentBuilder.toString();
+        }
+
+        public List<CharPosition> getcharPositions() {
+            return charPositions;
+        }
+    }
+
+    private static class CharPosition {
+        private int pageNum = 0;
+        private float x = 0;
+        private float y = 0;
+
+        public CharPosition(int pageNum, float x, float y) {
+            this.pageNum = pageNum;
+            this.x = x;
+            this.y = y;
+        }
+
+        public int getPageNum() {
+            return pageNum;
+        }
+
+        public float getX() {
+            return x;
+        }
+
+        public float getY() {
+            return y;
+        }
+
+        @Override
+        public String toString() {
+            return "[pageNum=" + this.pageNum + ",x=" + this.x + ",y=" + this.y
+                    + "]";
+        }
+    }
+
+    public static String getNetUrl(String fileUrl){
+        String file_path = ParamCache.getValue(CommonConstant.SYS_LOCAL_URL);
+        String sys_file_net_url = ParamCache.getValue(CommonConstant.SYS_FILE_NET_URL);
+
+        String path = sys_file_net_url + fileUrl.replaceAll("//", "/").replaceAll(file_path, "");
+        return path;
+    }
+}