liuyc 2 年 前
コミット
212415858d

+ 0 - 29
blade-service/blade-business/src/main/java/org/springblade/business/controller/TestDemoController.java

@@ -1,29 +0,0 @@
-package org.springblade.business.controller;
-
-import lombok.AllArgsConstructor;
-import org.springblade.business.socket.WebSocket;
-import org.springblade.core.boot.ctrl.BladeController;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import java.io.IOException;
-
-@RestController
-@AllArgsConstructor
-@RequestMapping("/task")
-public class TestDemoController extends BladeController {
-
-    private WebSocket webSocket;
-
-    @PostMapping("/sentMessage")
-    public void sentMessage(String userId,String message){
-        try {
-            webSocket.sendMessageByUserId(userId,message);
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
-
-}

+ 3 - 4
blade-service/blade-business/src/main/java/org/springblade/business/service/impl/TrialSelfInspectionRecordServiceImpl.java

@@ -1112,15 +1112,14 @@ public class TrialSelfInspectionRecordServiceImpl
         }
 
         //获取当前节点的合并的pdfURL
-        InformationQuery informationQuery = informationQueryService.getBaseMapper().selectOne(Wrappers.<InformationQuery>lambdaQuery()
+        InformationQuery informationQuery = informationQueryService.getBaseMapper().selectList(Wrappers.<InformationQuery>lambdaQuery()
                 .eq(InformationQuery::getWbsId, dto.getNodeId())
                 .eq(InformationQuery::getProjectId, dto.getProjectId())
                 .eq(InformationQuery::getContractId, dto.getContractId())
-                .eq(InformationQuery::getType, 1) //质检
-        );
+                .eq(InformationQuery::getType, 1)).stream().findAny().orElse(null);
 
         if (StringUtils.isNotEmpty(dto.getIds())) {
-            if (ObjectUtil.isNotEmpty(informationQuery) && StringUtils.isNotEmpty(informationQuery.getPdfUrl())) {
+            if (informationQuery != null && StringUtils.isNotEmpty(informationQuery.getPdfUrl())) {
 
                 List<String> pdfList = new ArrayList<>();
 

+ 7 - 2
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -1518,7 +1518,7 @@ public class ExcelTabController extends BladeController {
             @ApiImplicitParam(name = "contractId", value = "合同段Id", required = true)
     })
     public R getpdfs(String nodeId, String classify, String contractId, String projectId) {
-        String sql = "select pdf_url, e_visa_pdf_url from u_information_query  where classify='" + classify + "' and  wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
+        String sql = "select pdf_url, e_visa_pdf_url,pdf_trial_url from u_information_query  where classify='" + classify + "' and  wbs_id='" + nodeId + "' and contract_id ='" + contractId + "' ";
 
         List<Map<String, Object>> maps = jdbcTemplate.queryForList(sql);
         if (maps != null && maps.size() >= 1) {
@@ -1528,12 +1528,17 @@ public class ExcelTabController extends BladeController {
                 //优先使用电签的PDF
                 pdfUrl = stringObjectMap.get("e_visa_pdf_url");
             }
+
+            if (stringObjectMap.get("pdf_trial_url") != null){
+                //优先使用试验合并的PDF
+                pdfUrl = stringObjectMap.get("pdf_trial_url");
+            }
+
             if(StringUtils.isEmpty(pdfUrl+"")){
                 return R.fail(300,"无数据");
             }else{
                 return R.data(pdfUrl);
             }
-
         } else {
             return R.fail("无历史数据预览,请保存数据");
         }

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

@@ -1399,7 +1399,6 @@ public class ExcelTabServiceImpl extends BaseServiceImpl<ExcelTabMapper, ExcelTa
             }
         }
 
-
         FileUtils.mergePdfPublicMethods(data, listPdf);
         BladeFile bladeFile = this.newIOSSClient.uploadFile(nodeId + ".pdf", listPdf);