Эх сурвалжийг харах

修改bug:资料上报pdf预览

lvy 3 сар өмнө
parent
commit
f2ed1a535a

+ 8 - 5
blade-service/blade-business/src/main/java/org/springblade/business/controller/InformationWriteQueryController.java

@@ -611,7 +611,8 @@ public class InformationWriteQueryController extends BladeController {
 //    @PushMessage(clientId = ClientIdConstant.BUSINESS_CLIENT_ID)
     public R<Object> abolishOne(@RequestParam String primaryKeyId, @RequestParam String classify, @RequestParam String projectId, @RequestParam String contractId) {
         //查询填报状态
-        InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getContractId, contractId)
+        InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId)
+//                .eq(InformationQuery::getContractId, contractId)
                 .eq(InformationQuery::getClassify, classify).eq(InformationQuery::getType, 1).in(InformationQuery::getStatus, 1,2));
         primaryKeyId = primaryKeyId + "*";
         if (businessData != null) {
@@ -619,7 +620,8 @@ public class InformationWriteQueryController extends BladeController {
             return this.batchAbolish(businessData.getId().toString(), primaryKeyId, projectId, contractId, "撤回成功");
         } else {
             //试验
-            InformationQuery businessDataTrial = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, contractId)
+            InformationQuery businessDataTrial = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify)
+//                    .eq(InformationQuery::getContractId, contractId)
                     .eq(InformationQuery::getType, 2).in(InformationQuery::getStatus, 1,2));
             if (businessDataTrial != null) {
                 //使用批量废除接口
@@ -719,7 +721,8 @@ public class InformationWriteQueryController extends BladeController {
         //记录状态
         String status = "1";
         //查询填报状态,type=1资料填报
-        InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getType, 1).last("order by id desc limit 1"));
+        WbsTreeContract obj = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(primaryKeyId);
+        InformationQuery businessData = this.informationQueryService.getOne(Wrappers.<InformationQuery>lambdaQuery().eq(InformationQuery::getWbsId, primaryKeyId).eq(InformationQuery::getClassify, classify).eq(InformationQuery::getContractId, obj.getContractId()).eq(InformationQuery::getType, 1).last("order by id desc limit 1"));
         if (businessData != null) {
             switch (businessData.getStatus()) {
                 case 0:
@@ -736,7 +739,7 @@ public class InformationWriteQueryController extends BladeController {
                     //如果不匹配,默认为未填报
                     status = "1";
                     //查询表格
-                    WbsTreeContract obj = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(primaryKeyId);
+//                    WbsTreeContract obj = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(primaryKeyId);
                     if (ObjectUtils.isNotEmpty(obj)) {
                         List<WbsTreeContract> tableList = this.wbsTreeContractClient.queryChildByParentId(obj, "queryTable", classify);
                         if (tableList != null && tableList.size() > 0) {
@@ -753,7 +756,7 @@ public class InformationWriteQueryController extends BladeController {
             }
         } else {
             //查询表格
-            WbsTreeContract obj = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(primaryKeyId);
+//            WbsTreeContract obj = this.wbsTreeContractClient.getContractNodeByPrimaryKeyId(primaryKeyId);
             if (ObjectUtils.isNotEmpty(obj)) {
                 List<WbsTreeContract> tableList = this.wbsTreeContractClient.queryChildByParentId(obj, "queryTable", classify);
                 if (tableList != null && tableList.size() > 0) {

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

@@ -4261,6 +4261,7 @@ public class ExcelTabController extends BladeController {
                         iq.setUpdateTime(new Date());
                         iq.setUpdateUser(b.getUserId());
                         informationQueryClient.update(iq);
+                        getPdfS(iq.getWbsId() + "", iq.getClassify() + "", iq.getContractId() + "");
                     }
                 }
             }

+ 1 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/utils/FileUtils.java

@@ -186,6 +186,7 @@ public class FileUtils {
                 try {
                     //获取OSS文件输入流
                     reader = new PdfReader(Objects.requireNonNull(CommonUtil.getOSSInputStream(urlStr)));
+                    PdfReader.unethicalreading = true;
                     pageCount = reader.getNumberOfPages();
 
                     for (int i = 0; i < pageCount; ++i) {