Browse Source

质检-施工日志列表分页实际数据不对

qianxb 7 months ago
parent
commit
796d2bd16e

+ 2 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/ContractLogMapper.xml

@@ -110,6 +110,7 @@
         is_deleted = 0
         and wbs_node_id = #{vo.wbsNodeId}
         and contract_id = #{vo.contractId}
+        and pdf_url is not null
         <if test="vo.queryValue != null and vo.queryValue != ''">
             and
             (
@@ -135,6 +136,7 @@
         is_deleted = 0
         and wbs_node_id = #{vo.wbsNodeId}
         and contract_id = #{vo.contractId}
+        and pdf_url is not null
         <if test="vo.queryValue != null and vo.queryValue != ''">
             and
             (

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

@@ -95,15 +95,15 @@ public class ContractLogServiceImpl extends BaseServiceImpl<ContractLogMapper, C
             return Condition.getPage(query);
         }
         //有数据,转换成VO
-        List<ContractLogVO> voResult = JSONArray.parseArray(JSONObject.toJSONString(result), ContractLogVO.class);
-        List<ContractLogVO> deduplicatedList = new ArrayList<>(voResult.stream()
-                .filter(vo -> vo.getPdfUrl() != null && !vo.getPdfUrl().isEmpty())
-                .collect(Collectors.toMap(
-                        vo -> vo.getPdfUrl() + vo.getCreateUserName(), //根据pdf、创建人去重
-                        vo -> vo,
-                        (existing, replacement) -> existing
-                ))
-                .values());
+        List<ContractLogVO> deduplicatedList = JSONArray.parseArray(JSONObject.toJSONString(result), ContractLogVO.class);
+//        List<ContractLogVO> deduplicatedList = new ArrayList<>(voResult.stream()
+//                .filter(vo -> vo.getPdfUrl() != null && !vo.getPdfUrl().isEmpty())
+//                .collect(Collectors.toMap(
+//                        vo -> vo.getPdfUrl() + vo.getCreateUserName(), //根据pdf、创建人去重
+//                        vo -> vo,
+//                        (existing, replacement) -> existing
+//                ))
+//                .values());
         deduplicatedList.sort(Comparator.comparing(ContractLogVO::getRecordTime).reversed());
         deduplicatedList.forEach(vo -> {
             vo.setName(vo.getFileName());