huangtf hai 8 meses
pai
achega
4a1d3e0e32
Modificáronse 21 ficheiros con 276 adicións e 105 borrados
  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. 11 1
      blade-service/blade-business/src/main/java/org/springblade/business/service/impl/ArchiveFileServiceImpl.java
  10. 0 36
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java
  11. 3 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/controller/TextdictInfoController.java
  12. 20 20
      blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java
  13. 0 24
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.xml
  14. 2 2
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TextdictInfoMapper.java
  15. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/TextdictInfoMapper.xml
  16. 1 1
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/ITextdictInfoService.java
  17. 13 6
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/ExcelTabServiceImpl.java
  18. 18 3
      blade-service/blade-manager/src/main/java/org/springblade/manager/service/impl/TextdictInfoServiceImpl.java
  19. 110 5
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/ExcelInfoUtils2.java
  20. 36 0
      blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FontUtil.java
  21. 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">

+ 11 - 1
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/ArchiveFileServiceImpl.java

@@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
 
 import java.util.*;
 import java.util.concurrent.ExecutorService;
+import java.util.stream.Collectors;
 
 /**
  * 服务实现类
@@ -156,7 +157,16 @@ public class ArchiveFileServiceImpl extends BaseServiceImpl<ArchiveFileMapper, A
             });
         }
         }
-
+        for (ArchiveFile vo : list) {
+            // 修改所有的认证状态,如果是不需要认证就设置为已认证,如果是需要认证就设置为未认证
+            if (vo.getIsNeedCertification() == 0){
+                vo.setIsCertification(1);
+            }
+            //循环查看是否把需要审批改为不需要审批,  不可能把不需要审批改为需要审批
+            if (vo.getStatus() == 0 && vo.getIsApproval() == 0) {
+                vo.setStatus(2);
+            }
+        }
         this.updateBatchById(JSONArray.parseArray(JSONObject.toJSONString(list), ArchiveFile.class));
     }
 

+ 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);
     }
 

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

@@ -607,26 +607,26 @@ public class ExecutorMeter extends FormulaExecutor {
                 sis.setPayRatio(ratioFc.apply(sis.getCurrentPeriodEndPay(),sis.getChangeMoney()));
                 totalList.add(sis);
             });
-            if(MeterInfo.MB_ZJ.equals(tec.meterInfo.getConfig())){
-                /*把所有计量期根据打印日期按自然月分类,支付信息按计量期分类*/
+        /*    if(MeterInfo.MB_ZJ.equals(tec.meterInfo.getConfig())){
+                *//*把所有计量期根据打印日期按自然月分类,支付信息按计量期分类*//*
                LinkedHashMap<Long,MeterPeriodInfo> meterPeriodInfoMap = tec.meterInfo.getMeterPeriodInfoLinkedHashMap();
                LinkedHashMap<Integer,MeterPeriodInfo> monthMeterMap=meterPeriodInfoMap.values().stream().collect(Collectors.toMap(e->e.getFormPrintDate().getMonthValue(),t->t,(v1,v2)->v2,LinkedHashMap::new));
-               /*根据清单编号、计量期分组*/
+               *//*根据清单编号、计量期分组*//*
                 Map<String,Map<Long,List<Payment>>> paymentGroup=paymentsPeriodEnd.stream().collect(Collectors.groupingBy(Payment::getNumber,Collectors.groupingBy(Payment::getPeriodId,Collectors.toList())));
                int max=monthMeterMap.keySet().stream().max(Comparator.comparingInt(t->t)).orElse(12);
                 BaseInfo baseInfo =tec.meterInfo.getBaseInfo();
                 totalList.forEach(sis->{
-                   /*单项占合同价的比例*/
+                   *//*单项占合同价的比例*//*
                    sis.setItemPercent(ratioFc.apply(sis.getChangeMoney(),baseInfo.getTotalAmount().toString()));
-                   /*单项计划完成完成比例*/
+                   *//*单项计划完成完成比例*//*
                    sis.setItemProgress(ratioFc.apply(sis.getCurrentPeriodEndPay(),sis.getChangeMoney()));
-                   /*本期占合同金额*/
+                   *//*本期占合同金额*//*
                    sis.setCurrentPayPercent(ratioFc.apply(sis.getCurrentPeriodPay(), sis.getChangeMoney()));
-                   /*本期末累计支付金额占合同比*/
+                   *//*本期末累计支付金额占合同比*//*
                    sis.setPayPercent(ratioFc.apply(sis.getCurrentPeriodEndPay(),sis.getChangeMoney()));
-                   /*根据月份来获取payment*/
+                   *//*根据月份来获取payment*//*
                    Map<Long,List<Payment>> meterPaymentGroup = paymentGroup.get(sis.getFormNumber());
-                   /*当前月已经累计的*/
+                   *//*当前月已经累计的*//*
                    List<Payment> pl =new ArrayList<>();
                    for(int i=1;i<=max;i++){
                        MeterPeriodInfo period = monthMeterMap.get(i);
@@ -641,8 +641,8 @@ public class ExecutorMeter extends FormulaExecutor {
                        }
                    }
                });
-                /*输出设置*/
-                /*合同按月计划完成进度*/
+                *//*输出设置*//*
+                *//*合同按月计划完成进度*//*
                 fieldDataFcMap.put(SubprojectInterimPaymentSummary.TBN+":key_21",dl->dl.stream().flatMap(e->{
                     List<List<Payment>> l= e.getMonthlyCompletion();
                     return  IntStream.range(0,12).boxed().map(month->{
@@ -656,24 +656,24 @@ public class ExecutorMeter extends FormulaExecutor {
                         }
                     });
                }).collect(Collectors.toList()));
-                /*分页*/
+                *//*分页*//*
                 List<List<SubprojectInterimPaymentSummary>> pageList = BaseUtils.splitList(totalList,capacity);
                 BiFunction<List<SubprojectInterimPaymentSummary>,Function<SubprojectInterimPaymentSummary,String>,String> sumFc= (page,fc)->page.stream().map(fc).map(BaseUtils::str2BigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString();
                 pageList.forEach(page->{
                         dataList.addAll(page);
                         SubprojectInterimPaymentSummary sis = new SubprojectInterimPaymentSummary("合计 (万元)");
-                        /*合同金额*/
+                        *//*合同金额*//*
                         sis.setContractMoney(sumFc.apply(page,SubprojectInterimPaymentSummary::getContractMoney));
-                        /*变更后的金额*/
+                        *//*变更后的金额*//*
                         sis.setChangeMoney(sumFc.apply(page,SubprojectInterimPaymentSummary::getChangeMoney));
-                        /*实际工程量金额*/
+                        *//*实际工程量金额*//*
                         sis.setCurrentPeriodPay(page.stream().map(SubprojectInterimPaymentSummary::getCurrentPeriodPay).map(BaseUtils::str2BigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
                         dataList.add(sis);
                 });
-                /*实际完成,累计完成、按月完成*/
+                *//*实际完成,累计完成、按月完成*//*
                 List<List<List<Payment>>> all =totalList.stream().map(SubprojectInterimPaymentSummary::getMonthlyCompletion).collect(Collectors.toList());
                 FormulaUtils.beRelyFrom(tec.getFormDataMap(),SubprojectInterimPaymentSummary.TBN,"key_22,key_23,key_24").forEach(e->e.setRepeat(true));
-                /*每月合计进度*/
+                *//*每月合计进度*//*
                 List<String> monthlySum= IntStream.range(0,max).boxed().map(month->{
                     List<Payment> tmp=  all.stream().flatMap(row->row.get(month).stream()).collect(Collectors.toList());
                     return  ratioFc.apply(tmp.stream().map(Payment::getMoneyAsBigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString(),baseInfo.getTotalAmount().toString());
@@ -687,12 +687,13 @@ public class ExecutorMeter extends FormulaExecutor {
                     elementWriter.write(t, monthlySum.stream().map(e->{double r=BaseUtils.obj2DoubleZero(e)- cp.get();
                         cp.set(BaseUtils.obj2DoubleZero(e));return r;}).collect(Collectors.toList()));
                 });
-                /*合同概要*/
+                *//*合同概要*//*
                 FormulaUtils.elementFindByCode(fdm,SubprojectInterimPaymentSummary.TBN+":key_24").ifPresent(t->{
                     elementWriter.write(t,"开工日期:"+baseInfo.getStartDatePlan()+" 始算工期日:"+baseInfo.getStartDate()+" 合同完成日期:"+baseInfo.getEndDatePlan()+" 合同期限$4天 时间延长$5天 修改后合同期限"+ CustomFunction.daysPassed(baseInfo.getStartDate(),baseInfo.getEndDate()) +"天(即至"+baseInfo.getEndDate()+")\n 合同总价"+baseInfo.getContractAmount().divide(new BigDecimal(10000),2,RoundingMode.HALF_UP)+"万元、暂定金$9万元、工程量清单金额$10万元、BG估计最终金额$11万元");
                 });
 
-            }else{
+            }else*/
+            {
                 LinkedHashMap<String,List<SubprojectInterimPaymentSummary>> chapterGroup= totalList.stream().collect(Collectors.groupingBy(e->getPrefix(e.getFormNumber()),LinkedHashMap::new,Collectors.toList()));
                 AtomicInteger loop = new AtomicInteger(chapterGroup.size());
                 chapterGroup.forEach((k,v)->{
@@ -750,7 +751,6 @@ public class ExecutorMeter extends FormulaExecutor {
         }
 
 
-
     }
 
 

+ 0 - 24
blade-service/blade-manager/src/main/java/org/springblade/manager/mapper/ArchiveTreeContractMapper.xml

@@ -674,30 +674,6 @@
         </foreach>
     </update>
 
-<!--    <select id="getListByContractId" resultType="org.springblade.business.entity.ArchiveFile">-->
-<!--        select id,-->
-<!--               project_id   as projectId,-->
-<!--               node_id      as nodeId,-->
-<!--               node_ext_id  as nodeExtId,-->
-<!--               file_name    as fileName,-->
-<!--               pdf_file_url as pdfFileUrl,-->
-<!--               sort-->
-<!--        from u_archive_file-->
-<!--        where contract_id = #{contractId} and is_deleted = 0;-->
-<!--    </select>-->
-
-<!--    <select id="getInformationByContractId" resultMap="org.springblade.business.entity.InformationQuery">-->
-<!--        id,-->
-<!--        wbs_id as wbsId,-->
-<!--        name,-->
-<!--        e_visa_pdf_url as eVisaPdfUrl,-->
-<!--        business_time as businessTime,-->
-<!--        e_visa_pdf_page as eVisaPdfPage,-->
-<!--        e_visa_pdf_size as eVisaPdfSize-->
-<!--        from u_information_query-->
-<!--        where is_deleted = 0-->
-<!--          and contract_id = #{contractId} and is_deleted = 0;-->
-<!--    </select>-->
 
     <!-- 批量添加归档合同树 -->
     <insert id="batchInsertArchiveTreeContract" parameterType="java.util.List">

+ 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);
 }

+ 13 - 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(" ","");
                                     }
-
                                 }
                             }
 

+ 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">