Ver código fonte

2024 3 26 号

zhuwei 8 meses atrás
pai
commit
cfba896605
18 arquivos alterados com 248 adições e 60 exclusões
  1. 1 0
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java
  2. 3 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/FixedFlow.java
  3. 13 0
      blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskInfoVO.java
  4. 3 0
      blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/MiddleMeterApplyVO.java
  5. 11 2
      blade-service/blade-business/src/main/java/org/springblade/business/controller/EVisaTaskCheckController.java
  6. 23 0
      blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java
  7. 2 1
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/FixedFlowMapper.xml
  8. 1 0
      blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml
  9. 0 36
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  10. 3 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java
  11. 2 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TextdictInfoMapper.java
  12. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TextdictInfoMapper.xml
  13. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/ITextdictInfoService.java
  14. 16 6
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  15. 18 3
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java
  16. 110 5
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/ExcelInfoUtils2.java
  17. 36 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FontUtil.java
  18. 4 2
      blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MiddleMeterApplyMapper.xml

+ 1 - 0
blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java

@@ -188,6 +188,7 @@ public class OssEndpoint {
         NewBladeFile newBladeFile = new NewBladeFile();
         BeanUtils.copyProperties(bladeFile, newBladeFile);
         newBladeFile.setFileSize(file.getSize() / 1024);
+        newBladeFile.setLink(bladeFile.getLink().replace("blade-oss-chongqing.oss-cn-shenzhen.aliyuncs.com/","oss.hcxxy.com"));
         return R.data(newBladeFile);
     }
 

+ 3 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/entity/FixedFlow.java

@@ -50,4 +50,7 @@ public class FixedFlow extends BaseEntity {
     @ApiModelProperty("是否是计量系统 1=是")
     private Integer isMeter;
 
+    @ApiModelProperty("排序")
+    private Integer sort;
+
 }

+ 13 - 0
blade-service-api/blade-business-api/src/main/java/org/springblade/business/vo/TaskInfoVO.java

@@ -0,0 +1,13 @@
+package org.springblade.business.vo;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.springblade.business.entity.Task;
+
+import java.util.List;
+
+@Data
+public class TaskInfoVO {
+    //
+    private List<Task> list;
+}

+ 3 - 0
blade-service-api/blade-meter-api/src/main/java/org/springblade/meter/vo/MiddleMeterApplyVO.java

@@ -47,4 +47,7 @@ public class MiddleMeterApplyVO extends MiddleMeterApply {
 	@ApiModelProperty(value = "附件集合")
 	private List<AttachmentForm> fileList;
 
+	@ApiModelProperty(value = "期数Pdf")
+	private String periodPdfUrl;
+
 }

+ 11 - 2
blade-service/blade-business/src/main/java/org/springblade/business/controller/EVisaTaskCheckController.java

@@ -26,6 +26,7 @@ import org.springblade.business.vo.FixedFlowVO;
 import org.springblade.core.secure.utils.AuthUtil;
 import org.springblade.core.tool.api.R;
 import org.springblade.core.tool.utils.Func;
+import org.springblade.core.tool.utils.ObjectUtil;
 import org.springblade.manager.entity.*;
 import org.springblade.manager.feign.*;
 import org.springblade.system.user.entity.User;
@@ -401,8 +402,16 @@ public class EVisaTaskCheckController {
                         //但凡有个不符合条件,禁选
                         next.setDisabled(true);
                         //设置提示信息
-                        String name = jdbcTemplate.queryForObject(" select name from blade_user WHERE id = " + userRole.get("userId"), String.class);
-                        next.setTips(name + "没有电签权限,请检查电签配置或查看表单是否隐藏");
+                        String name="";
+                        List<Map<String, Object>> userInfo = jdbcTemplate.queryForList("select name from blade_user WHERE id =" + userRole.getString("userId"));
+                        if(userInfo!=null && userInfo.size()>1){
+                            name = userInfo.get(0).get("name")+"";
+                            next.setTips(name + "没有电签权限,请检查电签配置或查看表单是否隐藏");
+                        }else{
+                            name = userRole.getString("userId");
+                            next.setTips(name + "该用户不存在");
+                        }
+
                         break;
                     }
                 }

+ 23 - 0
blade-service/blade-business/src/main/java/org/springblade/business/controller/TaskController.java

@@ -814,6 +814,9 @@ public class TaskController extends BladeController {
         }
     }
 
+
+
+
     /**
      * 批量审批-获取档案审批任务对应业务数据的pdf信息
      */
@@ -1437,6 +1440,10 @@ public class TaskController extends BladeController {
         return R.data(page);
     }
 
+
+
+
+
     /**
      * 任务管理-电签失败分页查询
      */
@@ -1683,4 +1690,20 @@ public class TaskController extends BladeController {
         }
     }
 
+    /**
+     * 排序
+     */
+    @PostMapping("/batchUpdateTaskSort")
+    @ApiOperationSupport(order = 4)
+    @ApiOperation(value = "排序")
+    public R<Boolean> batchUpdateSort(@RequestBody TaskInfoVO vo) {
+        if(vo.getList()!=null){
+            for (int i=0;i<vo.getList().size();i++){
+                String upSql = "update u_fixed_flow set sort="+i+" where id="+vo.getList().get(i).getId()+"";
+                jdbcTemplate.update(upSql);
+            }
+        }
+        return R.data(true);
+    }
+
 }

+ 2 - 1
blade-service/blade-business/src/main/java/org/springblade/business/mapper/FixedFlowMapper.xml

@@ -15,6 +15,7 @@
         <result column="fixed_flow_name" property="fixedFlowName"/>
         <result column="project_id" property="projectId"/>
         <result column="contract_id" property="contractId"/>
+        <result column="sort" property="sort"/>
     </resultMap>
 
     <select id="countFixedFlow" resultType="java.lang.Integer">
@@ -35,7 +36,7 @@
           and project_id = #{vo.projectId}
           and contract_id =
               #{vo.contractId}
-        order by create_time DESC limit ${current}, ${size}
+        order by sort ASC limit ${current}, ${size}
     </select>
 
 </mapper>

+ 1 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/InformationQueryMapper.xml

@@ -33,6 +33,7 @@
        <result column="business_time" property="businessTime"/>
         <result column="e_visa_pdf_page" property="eVisaPdfPage"/>
         <result column="e_visa_pdf_size" property="eVisaPdfSize"/>
+        <result column="node_pdf_url" property="nodePdfUrl"/>
     </resultMap>
 
     <resultMap id="queryProcessDataMap" type="org.springblade.business.vo.QueryProcessDataVO">

+ 0 - 36
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -1926,34 +1926,6 @@ public class ExcelTabController extends BladeController {
             tableInfoList.forEach(e->{e.setToBeUpdated(true);});
             tableAll = wbsTreeContractService.searchNodeAllTable(nodeId, "1", contractId, projectId, null);
             doForTableIst(tableAll,tableInfoList);
-          /*  List<Long> tableAllIds = tableAll.stream().map(AppWbsTreeContractVO::getPKeyId).collect(Collectors.toList());
-            if (tableAll.size() > tableInfoList.size()) {
-                List<Long> exclude = tableInfoList.stream().map(TableInfo::getPkeyId).map(Long::parseLong).collect(Collectors.toList());
-                JSONArray extra = new JSONArray();
-                for (Long pk : tableAllIds) {
-                    if (!exclude.contains(pk)) {
-                        Map<String, Object> jo = this.excelTabService.getBussDataInfo(pk, 1);
-                        if (ObjectUtils.isNotEmpty(jo)) {
-                            jo.put("pkeyId", pk);
-                            extra.add(jo);
-                        }
-                    }
-                }
-                List<TableInfo> tableInfoExtra = this.excelTabService.getTableInfoList(extra);
-                *//*默认额外加载的默认不更新,除非有元素数据变动*//*
-                tableInfoExtra.removeIf(e -> e.getPkeyId() == null);
-                TableInfo example = tableInfoList.get(0);
-                tableInfoExtra.forEach(e -> {
-                    e.setToBeUpdated(false);
-                    e.setBusinessId(null);
-                    e.setContractId(example.getContractId());
-                    e.setClassify(example.getClassify());
-                    e.setProjectId(example.getProjectId());
-                    e.setGroupId(example.getGroupId());
-                });
-                tableInfoList.addAll(tableInfoExtra);
-                tableInfoList.sort(Comparator.comparingInt(a -> tableAllIds.indexOf(Long.parseLong(a.getPkeyId()))));
-            }*/
         }
         System.out.println("加载所有表单数据耗时:"+(System.currentTimeMillis()-start));
         //公式填充
@@ -1973,14 +1945,6 @@ public class ExcelTabController extends BladeController {
         List<String> errorPKeyIds = new ArrayList<>();
         //单个pdf加载
         if (tableInfoList != null) {
-/*            for (TableInfo tableInfo : tableInfoList) {
-                R bussPdfInfo = excelTabService.getBussPdfInfo(Long.parseLong(tableInfo.getPkeyId()));
-
-                if (ObjectUtil.isEmpty(bussPdfInfo) || bussPdfInfo.getCode() != 200) {
-                    //如果返回的单张pdfUrl为空,那么表示发生异常,返回异常信息
-                    errorPKeyIds.add(tableInfo.getPkeyId());
-                }
-            }*/
             tableInfoList.parallelStream().forEach(tableInfo -> {
                 R bussPdfInfo = null;
                 try {

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

@@ -96,7 +96,9 @@ public class TextdictInfoController extends BladeController {
     @ApiOperationSupport(order = 1)
     @ApiOperation(value = "详情", notes = "传入textdictInfo")
     public R<TextdictInfo> detail(TextdictInfo textdictInfo) {
-        TextdictInfoVO detail = textdictInfoService.selectTextdictInfoById(textdictInfo.getId()+"");
+        WbsTreePrivate wbsTreePrivate = wbsTreePrivateMapper.getByPKeyId(Long.parseLong(textdictInfo.getTabId()));
+        textdictInfo.setProjectId(wbsTreePrivate.getProjectId());
+        TextdictInfoVO detail = textdictInfoService.selectTextdictInfoById(textdictInfo);
         return R.data(detail);
     }
 

+ 2 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TextdictInfoMapper.java

@@ -42,9 +42,9 @@ public interface TextdictInfoMapper extends EasyBaseMapper<TextdictInfo> {
      */
     List<TextdictInfoVO> selectTextdictInfoPage(IPage page, TextdictInfoVO textdictInfo);
 
-    TextdictInfoVO selectTextdictInfoById(@Param("id") String id);
+    List<TextdictInfoVO> selectTextdictInfoById(@Param("id") String id);
 
 
     List<TextdictInfoVO> selectTextdictInfoByExcelId(IPage page, TextdictInfoVO textdictInfo);
-    List<TextdictInfoVO> selectTextdictBYIds(@Param("ids") List<String> ids);
+    List<TextdictInfoVO> selectTextdictBYIds(@Param("ids") List<String> ids,@Param("projectId") String projectId);
 }

+ 1 - 1
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TextdictInfoMapper.xml

@@ -46,7 +46,7 @@
 
     <select id="selectTextdictBYIds" resultMap="textdictInfoResultMap">
         SELECT a.* from m_textdict_info a
-        where id in
+        where project_id=#{projectId} and  id in
         <foreach collection="ids" item="id" open="(" close=")" separator=",">
             #{id}
         </foreach>

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

@@ -42,7 +42,7 @@ public interface ITextdictInfoService extends IService<TextdictInfo> {
      */
     IPage<TextdictInfoVO> selectTextdictInfoPage(IPage<TextdictInfoVO> page, TextdictInfoVO textdictInfo);
 
-    TextdictInfoVO selectTextdictInfoById(String id);
+    TextdictInfoVO selectTextdictInfoById(TextdictInfo textdictInfo);
 
     void deleDataInfoById(String id);
 }

+ 16 - 6
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java

@@ -1304,7 +1304,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             Elements htdtitle = doc.select("el-input[placeholder~=.*合同段.*]");
             //合同名称显示合同名称
             Elements htdtitle1 = doc.select("el-input[placeholder~=合同名称.*]");
-//            htdtitle.addAll(htdtitle1);
+
 
             Elements jltitle = doc.select("el-input[placeholder~=监理单位.*]");
 
@@ -1313,6 +1313,9 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             //合同编号为合同编号
             Elements bhtitle1 = doc.select("el-input[placeholder~=合同编号.*]");
             bhtitle1.addAll(htdtitle);
+            Elements htdtitle2 = doc.select("el-input[placeholder~=合同号.*]");
+            bhtitle1.addAll(htdtitle2);
+
 
             Elements xmtitle = doc.select("el-input[placeholder~=^项目名称]");
 
@@ -1986,12 +1989,16 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
                                 Object obj = DataInfo.get(val);
                                 if (obj instanceof String[]) {
                                     String[] dataDate = (String[]) obj;
-                                    if ((dataDate[0].trim()).equals((dataDate[1].trim()))) {
-                                        myData = dataDate[0];
-                                    } else {
-                                        myData = dataDate[0].replace("\"", "") + "-" + dataDate[1].trim().replace("\"", "");
+                                    String HtmlEle = data.toString();
+                                    if(HtmlEle.indexOf("el-date-picker")>=0){//时间时间段处理格式
+                                        if ((dataDate[0].trim()).equals((dataDate[1].trim()))) {
+                                            myData = dataDate[0];
+                                        } else {
+                                            myData = dataDate[0].replace("\"", "") + "-" + dataDate[1].trim().replace("\"", "");
+                                        }
+                                    }else{
+                                        myData = Func.convert(dataDate,String.class).replaceAll(" ","");
                                     }
-
                                 }
                             }
 
@@ -3651,4 +3658,7 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
         IoUtil.closeQuietly(exceInp);
     }
 
+
+
+
 }

+ 18 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java

@@ -70,7 +70,7 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
                 Elements table = doc.getElementsByAttribute("dqid");
                 if(table.size()>=1){
                     List<String> dqid = table.stream().map(d -> d.attr("dqid")).distinct().collect(Collectors.toList());
-                    textdict = baseMapper.selectTextdictBYIds(dqid);
+                    textdict = baseMapper.selectTextdictBYIds(dqid,privateInfo.getProjectId());
                     if(textdict==null || textdict.size()<=0){
                         textdict = baseMapper.selectTextdictInfoByExcelId(page, textdictInfo);
                     }
@@ -88,8 +88,23 @@ public class TextdictInfoServiceImpl extends ServiceImpl<TextdictInfoMapper, Tex
     }
 
     @Override
-    public TextdictInfoVO selectTextdictInfoById(String id) {
-        return baseMapper.selectTextdictInfoById(id);
+    public TextdictInfoVO selectTextdictInfoById(TextdictInfo textdictInfo) {
+        List<TextdictInfoVO>  dataInfo = baseMapper.selectTextdictInfoById(textdictInfo.getId()+"");
+        TextdictInfoVO testinfo = new TextdictInfoVO();
+        if(dataInfo==null){
+
+        } else if ( dataInfo.size()>1) {
+            for (TextdictInfoVO da :dataInfo){
+                if(da.getProjectId().equals(textdictInfo.getProjectId())){
+                    testinfo = da;
+                    break;
+                }
+            }
+        }else {
+            testinfo =dataInfo.get(0);
+        }
+
+        return testinfo;
     }
 
     @Override

+ 110 - 5
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/ExcelInfoUtils2.java

@@ -6,11 +6,12 @@ import com.spire.xls.FileFormat;
 import com.spire.xls.Workbook;
 import com.spire.xls.Worksheet;
 import com.spire.xls.core.spreadsheet.HTMLOptions;
+import com.sun.javafx.tk.FontMetrics;
 import org.apache.commons.lang.StringUtils;
-import org.apache.poi.ss.usermodel.Cell;
-import org.apache.poi.ss.usermodel.Row;
-import org.apache.poi.ss.usermodel.Sheet;
-import org.apache.poi.ss.usermodel.WorkbookFactory;
+import org.apache.poi.ss.usermodel.*;
+import org.apache.poi.ss.usermodel.Font;
+import org.apache.poi.ss.util.CellRangeAddress;
+import org.apache.poi.xssf.usermodel.XSSFWorkbook;
 import org.jsoup.Jsoup;
 import org.jsoup.nodes.Document;
 import org.jsoup.nodes.Element;
@@ -20,8 +21,10 @@ import org.springblade.common.utils.SnowFlakeUtil;
 import org.springblade.core.tool.utils.FileUtil;
 import org.springblade.core.tool.utils.Func;
 import org.springblade.core.tool.utils.IoUtil;
-import org.springblade.manager.vo.DateFormat;
+import org.apache.poi.ss.util.CellUtil;
 
+import javax.swing.*;
+import java.awt.*;
 import java.io.*;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -266,4 +269,106 @@ public class ExcelInfoUtils2 {
         workbook.write(outputStream);
     }
 
+    public static void main11121(String[] args) throws Exception {
+        FileInputStream inputStream = new FileInputStream("/Users/hongchuangyanfa/Desktop/excel/123456.xlsx");
+        org.apache.poi.ss.usermodel.Workbook workbook = new XSSFWorkbook(inputStream);
+        Sheet sheet = workbook.getSheetAt(0);
+        Row row = sheet.getRow(0);
+        Cell cell = row.getCell(0);
+
+        if (cell != null) {
+            Font font = workbook.getFontAt(cell.getCellStyle().getFontIndex());
+            // 获取字体间距,单位为1/20个字符宽度
+            short typeOffset = font.getTypeOffset();
+            System.out.println("字体间距(字间距): " + typeOffset);
+            String data = cell.getStringCellValue();
+            data = data.replaceAll("[^\\x00-\\xff]", "**");
+            int length = data.length();
+
+
+            double shij = cell.getSheet().getColumnWidth(cell.getColumnIndex());
+
+            short fontSize = font.getFontHeightInPoints();
+
+            System.out.println(checkCellReasonable(cell,fontSize));
+
+        }
+        workbook.close();
+        inputStream.close();
+    }
+
+
+
+    private static boolean checkCellReasonable(Cell cell, double fontSize) {
+        String  data = cell.getStringCellValue();
+       // data = data.replaceAll("[^\\x00-\\xff]", "**");
+      //  int sum = data.length();
+
+        double cellHeight = cell.getRow().getHeightInPoints();
+        double cellHeight2 = cell.getRow().getHeight();
+       // double rows1 = fontWidth * sum / cellWidth;
+        double shij = cell.getSheet().getColumnWidth(cell.getColumnIndex());
+
+        int i = data.getBytes().length  * 256;
+        System.out.println(shij>i);
+        return true;
+    }
+
+
+    private static double getTotalWidth(Cell cell) {
+        int x = getColNum(cell.getSheet(), cell.getRowIndex(), cell.getColumnIndex());
+        double totalWidthInPixels = 0;
+        for (int i = 0; i < x; i++) {
+            totalWidthInPixels += cell.getSheet().getColumnWidthInPixels(i + cell.getColumnIndex());
+        }
+        return totalWidthInPixels;
+    }
+
+    private static int getColNum(Sheet sheet, int row, int column) {
+        int sheetMergeCount = sheet.getNumMergedRegions();
+        //判断该单元格是否是合并区域的内容
+        for (int i = 0; i < sheetMergeCount; i++) {
+            CellRangeAddress ca = sheet.getMergedRegion(i);
+            int firstColumn = ca.getFirstColumn();
+            int lastColumn = ca.getLastColumn();
+            int firstRow = ca.getFirstRow();
+            int lastRow = ca.getLastRow();
+
+            if (row >= firstRow && row <= lastRow && column >= firstColumn && column <= lastColumn) {
+                return lastColumn - firstColumn + 1;
+            }
+        }
+        return 1;
+    }
+
+
+/*            6pt     8px
+            7pt     9px
+            7.5pt   10px
+            8pt     11px
+            9pt     12px
+            10pt     13px
+            10.5pt   14px
+            11pt     15px
+            12pt     16px
+            13pt     17px
+            13.5pt   18px
+            14pt     19px
+            14.5pt   20px
+            15pt     21px
+            16pt     22px
+            17pt     23px
+            18pt     24px
+            20pt     26px
+            22pt     29px
+            24pt     32px
+            26pt     35px
+            27pt     36px
+            28pt     37px
+            29pt     38px
+            30pt     40px
+            32pt     42px
+            34pt     45px
+            36pt     48px */
+
 }

+ 36 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FontUtil.java

@@ -0,0 +1,36 @@
+package org.springblade.manager.utils;
+
+import sun.font.FontDesignMetrics;
+
+import java.io.FileInputStream;
+
+
+import javax.swing.*;
+import java.awt.*;
+import java.io.File;
+/**
+ * @Project my
+ * @PackageName com.my.test.codeTest.test.图片组合
+ * @ClassName FontUtil
+ * @Author jiahong.xing
+ * @Date 2019/5/17 10:24
+ * @Description 字体工具类
+ */
+public class FontUtil {
+
+    public static void main123(String[] args) throws Exception {
+        String str = "点点滴滴";
+        getWidth(str);
+    }
+
+    public static void getWidth(String str){
+
+        Font font = new Font("宋体",Font.BOLD,6);
+        FontDesignMetrics metrics = FontDesignMetrics.getMetrics(font);
+
+        char[] strcha = str.toCharArray();
+        int strWidth = metrics.charsWidth(strcha, 0, str.length());
+
+        System.out.println(strWidth);
+    }
+}

+ 4 - 2
blade-service/blade-meter/src/main/java/org/springblade/meter/mapper/MiddleMeterApplyMapper.xml

@@ -86,7 +86,8 @@
         SELECT *,
                CASE when approve_status = 0 then '未上报' when approve_status = 1 then '待审批' when approve_status = 2 then '已审批'
                     else '已废除' end as approveStatusName,
-               (select period_number from s_contract_meter_period cmp where cmp.id = mma.contract_period_id) as periodNumber
+               (select period_number from s_contract_meter_period cmp where cmp.id = mma.contract_period_id) as periodNumber,
+               (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=#{apply.contractPeriodId} ) as periodPdfUrl
         FROM s_middle_meter_apply mma
         WHERE contract_id = #{apply.contractId} and is_deleted = 0
         <if test="apply.contractPeriodId != -1">
@@ -102,7 +103,8 @@
         SELECT *,
                CASE when approve_status = 0 then '未上报' when approve_status = 1 then '待审批' when approve_status = 2 then '已审批'
                     else '已废除' end as approveStatusName,
-               (select period_number from s_contract_meter_period cmp where cmp.id = mma.contract_period_id) as periodNumber
+               (select period_number from s_contract_meter_period cmp where cmp.id = mma.contract_period_id) as periodNumber,
+               (SELECT raw_url from s_interim_pay_certificate where contract_id=#{apply.contractId} and contract_period_id=mma.contract_period_id ) as periodPdfUrl
         FROM s_middle_meter_apply mma
         WHERE contract_id = #{apply.contractId} and is_deleted = 0
         <if test="apply.contractPeriodId != -1">