Selaa lähdekoodia

Merge remote-tracking branch 'origin/debug' into debug

zhanghang 3 vuotta sitten
vanhempi
commit
25ccdb1032

+ 2 - 0
common/src/main/java/com/lantone/common/vo/DataCompareVO.java

@@ -19,6 +19,8 @@ import java.util.Date;
 public class DataCompareVO implements Serializable {
 
     private static final long serialVersionUID = 4949654901048650724L;
+    @ApiModelProperty(value = "医院id", hidden = true)
+    private Long hospitalId;
 
     @ApiModelProperty(value = "开始日期")
     private Date startDate;

+ 12 - 12
daqe-center/src/main/java/com/lantone/daqe/dto/BlockLossTypeGatherDTO.java

@@ -20,29 +20,29 @@ public class BlockLossTypeGatherDTO implements Serializable {
 
     private static final long serialVersionUID = -4656915107891039438L;
     @ApiModelProperty(value = "HIS数量")
-    private Integer hisNum;
+    private Integer hisNum = 0;
     @ApiModelProperty(value = "接口日志数量")
-    private Integer logNum;
+    private Integer logNum = 0;
     @ApiModelProperty(value = "实际数量")
-    private Integer realNum;
+    private Integer realNum = 0;
     @ApiModelProperty(value = "合计丢失数量")
-    private Integer allLossNum;
+    private Integer allLossNum = 0;
     @ApiModelProperty(value = "外部丢失数量")
-    private Integer outLossNum;
+    private Integer outLossNum = 0;
     @ApiModelProperty(value = "外部文书丢失数量")
-    private Integer outRecNum;
+    private Integer outRecNum = 0;
     @ApiModelProperty(value = "外部病历号丢失数量")
-    private Integer outCodeNum;
+    private Integer outCodeNum = 0;
     @ApiModelProperty(value = "外部病案首页丢失数量")
-    private Integer outHomePageNum;
+    private Integer outHomePageNum = 0;
     @ApiModelProperty(value = "内部丢失数量")
-    private Integer inLossNum;
+    private Integer inLossNum = 0;
     @ApiModelProperty(value = "内部文书丢失数量")
-    private Integer inRecNum;
+    private Integer inRecNum = 0;
     @ApiModelProperty(value = "内部病历号丢失数量")
-    private Integer inCodeNum;
+    private Integer inCodeNum = 0;
     @ApiModelProperty(value = "内部病案首页丢失数量")
-    private Integer inHomePageNum;
+    private Integer inHomePageNum = 0;
 
 
 }

+ 107 - 83
daqe-center/src/main/java/com/lantone/daqe/facade/BlockLossManagementFacade.java

@@ -68,6 +68,9 @@ public class BlockLossManagementFacade {
     @Autowired
     private OperationLogService operationLogService;
 
+    @Autowired
+    private HisDataManagementFacade hisDataManagementFacade;
+
 
     /**
      * 获取病历数据丢失明细分页列表
@@ -103,8 +106,10 @@ public class BlockLossManagementFacade {
         Boolean flag = false;
         //====1.获取已丢失状态记录,去数据库中对比判断是否补录
         List<BlocklossResult> lossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
-                .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
-                .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
+                .select("id,behospital_code,rec_id,loss_type,loss_way")
+//                .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
+//                .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
+                .eq(SysUserUtils.getCurrentHospitalId() != null, "hospital_id", SysUserUtils.getCurrentHospitalId())
                 .eq("status", LossStatusEnum.IS_LOSS.getKey())
                 .eq("is_deleted", IsDeleteEnum.N.getKey()));
         Map<String, List<BlocklossResult>> lossResultMap = null;
@@ -135,26 +140,29 @@ public class BlockLossManagementFacade {
         //病历数据
         List<String> dataBaseBehospitalCodes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
                 .select("behospital_code")
-                .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
-                .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
-                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                .ge(dataCompareVO.getStartDate() != null && dataCompareVO.getBehospitalCode() == null, "gmt_create", dataCompareVO.getStartDate())
+                .le(dataCompareVO.getEndDate() != null && dataCompareVO.getBehospitalCode() == null, "gmt_create", dataCompareVO.getEndDate())
+                .eq(dataCompareVO.getBehospitalCode() != null, "behospital_code", dataCompareVO.getBehospitalCode())
+                .eq(SysUserUtils.getCurrentHospitalId() != null, "hospital_id", SysUserUtils.getCurrentHospitalId())
                 .eq("is_deleted", IsDeleteEnum.N.getKey()))
                 .stream().map(BehospitalInfo::getBehospitalCode).collect(Collectors.toList());
         //病案首页数据
         List<String> dataBaseHomePageIds = homePageFacade.list(new QueryWrapper<HomePage>()
                 .select("home_page_id")
-                .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
-                .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
-                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                .ge(dataCompareVO.getStartDate() != null && dataCompareVO.getBehospitalCode() == null, "gmt_create", dataCompareVO.getStartDate())
+                .le(dataCompareVO.getEndDate() != null && dataCompareVO.getBehospitalCode() == null, "gmt_create", dataCompareVO.getEndDate())
+                .eq(dataCompareVO.getBehospitalCode() != null, "behospital_code", dataCompareVO.getBehospitalCode())
+                .eq(SysUserUtils.getCurrentHospitalId() != null, "hospital_id", SysUserUtils.getCurrentHospitalId())
                 .eq("is_deleted", IsDeleteEnum.N.getKey()))
                 .stream().map(HomePage::getHomePageId).collect(Collectors.toList());
 
         //文书数据
         List<String> dataBaseRecIds = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
                 .select("rec_id")
-                .ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
-                .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
-                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                .ge(dataCompareVO.getStartDate() != null && dataCompareVO.getBehospitalCode() == null, "gmt_create", dataCompareVO.getStartDate())
+                .le(dataCompareVO.getEndDate() != null && dataCompareVO.getBehospitalCode() == null, "gmt_create", dataCompareVO.getEndDate())
+                .eq(dataCompareVO.getBehospitalCode() != null, "behospital_code", dataCompareVO.getBehospitalCode())
+                .eq(SysUserUtils.getCurrentHospitalId() != null, "hospital_id", SysUserUtils.getCurrentHospitalId())
                 .eq("is_deleted", IsDeleteEnum.N.getKey()))
                 .stream().map(MedicalRecord::getRecId).collect(Collectors.toList());
 
@@ -167,35 +175,36 @@ public class BlockLossManagementFacade {
         List<String> inLossCodes = null;
         List<String> inLossHomepages = null;
         List<String> inLossRecs = null;
-        if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.REC_LOSS.getKey()))) {
-            Map<String, List<BlocklossResult>> lossWayRecMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.REC_LOSS.getKey()), "lossWay");
-            if (ListUtil.isNotEmpty(lossWayRecMap.get(LossWayEnum.OUT_LOSS))) {
-                outLossRecs = lossWayRecMap.get(LossWayEnum.OUT_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
-            }
-            if (ListUtil.isNotEmpty(lossWayRecMap.get(LossWayEnum.IN_LOSS))) {
-                inLossRecs = lossWayRecMap.get(LossWayEnum.IN_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
-            }
-        }
-        if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.HOMEPAGE_LOSS.getKey()))) {
-            Map<String, List<BlocklossResult>> lossWayHomePageMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.HOMEPAGE_LOSS.getKey()), "lossWay");
-            if (ListUtil.isNotEmpty(lossWayHomePageMap.get(LossWayEnum.OUT_LOSS))) {
-                outLossHomepages = lossWayHomePageMap.get(LossWayEnum.OUT_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
-            }
-            if (ListUtil.isNotEmpty(lossWayHomePageMap.get(LossWayEnum.IN_LOSS))) {
-                inLossHomepages = lossWayHomePageMap.get(LossWayEnum.IN_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
+        if (lossResultMap != null) {
+            if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.REC_LOSS.getKey()))) {
+                Map<String, List<BlocklossResult>> lossWayRecMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.REC_LOSS.getKey()), "lossWay");
+                if (ListUtil.isNotEmpty(lossWayRecMap.get(LossWayEnum.OUT_LOSS.getKey()))) {
+                    outLossRecs = lossWayRecMap.get(LossWayEnum.OUT_LOSS.getKey()).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
+                }
+                if (ListUtil.isNotEmpty(lossWayRecMap.get(LossWayEnum.IN_LOSS.getKey()))) {
+                    inLossRecs = lossWayRecMap.get(LossWayEnum.IN_LOSS.getKey()).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
+                }
             }
-        }
-        if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.CODE_LOSS.getKey()))) {
-            Map<String, List<BlocklossResult>> lossWayCodeMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.CODE_LOSS.getKey()), "lossWay");
-            if (ListUtil.isNotEmpty(lossWayCodeMap.get(LossWayEnum.OUT_LOSS))) {
-                outLossCodes = lossWayCodeMap.get(LossWayEnum.OUT_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.HOMEPAGE_LOSS.getKey()))) {
+                Map<String, List<BlocklossResult>> lossWayHomePageMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.HOMEPAGE_LOSS.getKey()), "lossWay");
+                if (ListUtil.isNotEmpty(lossWayHomePageMap.get(LossWayEnum.OUT_LOSS.getKey()))) {
+                    outLossHomepages = lossWayHomePageMap.get(LossWayEnum.OUT_LOSS.getKey()).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
+                }
+                if (ListUtil.isNotEmpty(lossWayHomePageMap.get(LossWayEnum.IN_LOSS.getKey()))) {
+                    inLossHomepages = lossWayHomePageMap.get(LossWayEnum.IN_LOSS.getKey()).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
+                }
             }
-            if (ListUtil.isNotEmpty(lossWayCodeMap.get(LossWayEnum.IN_LOSS))) {
-                inLossCodes = lossWayCodeMap.get(LossWayEnum.IN_LOSS).stream().map(BlocklossResult::getRecId).collect(Collectors.toList());
+            if (ListUtil.isNotEmpty(lossResultMap.get(LossTypeEnum.CODE_LOSS.getKey()))) {
+                Map<String, List<BlocklossResult>> lossWayCodeMap = EntityUtil.makeEntityListMap(lossResultMap.get(LossTypeEnum.CODE_LOSS.getKey()), "lossWay");
+                if (ListUtil.isNotEmpty(lossWayCodeMap.get(LossWayEnum.OUT_LOSS.getKey()))) {
+                    outLossCodes = lossWayCodeMap.get(LossWayEnum.OUT_LOSS.getKey()).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList());
+                }
+                if (ListUtil.isNotEmpty(lossWayCodeMap.get(LossWayEnum.IN_LOSS.getKey()))) {
+                    inLossCodes = lossWayCodeMap.get(LossWayEnum.IN_LOSS.getKey()).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList());
+                }
             }
         }
 
-
         //=====2.2数据对比
         //his与log日志做对比
         if (ListUtil.isNotEmpty(hisMedicalRecords)) {
@@ -208,7 +217,7 @@ public class BlockLossManagementFacade {
                     hisMedicalRecordDTO.getHisRecs().stream().forEach(hisRecDTO -> {
                         GetOperationLogDTO medicalRecord = new GetOperationLogDTO();
                         medicalRecord.setRecId(hisRecDTO.getRecId());
-                        medicalRecord.setRecId(hisRecDTO.getRecTitle());
+                        medicalRecord.setRecTitle(hisRecDTO.getRecTitle());
                         medicalRecord.setBehospitalCode(hisMedicalRecordDTO.getBehospitalCode());
                         recs.add(medicalRecord);
                     });
@@ -218,11 +227,11 @@ public class BlockLossManagementFacade {
             //外部丢失数据集合
             List<BlocklossResult> outInserts = new ArrayList<>();
             //文书数据对比
-            compareHisWithLog(recs, recLogs, "0", outInserts, outLossRecs);
+            compareHisWithLog(recs, recLogs, LossTypeEnum.REC_LOSS.getKey(), outInserts, outLossRecs);
             //病案首页数据对比
-            compareHisWithLog(medicalRecords, homePageLogs, "1", outInserts, outLossHomepages);
+            compareHisWithLog(medicalRecords, homePageLogs, LossTypeEnum.HOMEPAGE_LOSS.getKey(), outInserts, outLossHomepages);
             //病历数据对比
-            compareHisWithLog(medicalRecords, behospitalCodeLogs, "2", outInserts, outLossCodes);
+            compareHisWithLog(medicalRecords, behospitalCodeLogs, LossTypeEnum.CODE_LOSS.getKey(), outInserts, outLossCodes);
 
             flag = blocklossResultServiceImpl.saveBatch(outInserts);
         }
@@ -231,13 +240,13 @@ public class BlockLossManagementFacade {
         //内部丢失数据集合
         List<BlocklossResult> inInserts = new ArrayList<>();
         if (ListUtil.isNotEmpty(recLogs)) {
-            compareLogWithLocal(recLogs, dataBaseRecIds, "0", inInserts, inLossRecs);
+            compareLogWithLocal(recLogs, dataBaseRecIds, LossTypeEnum.REC_LOSS.getKey(), inInserts, inLossRecs);
         }
         if (ListUtil.isNotEmpty(homePageLogs)) {
-            compareLogWithLocal(homePageLogs, dataBaseHomePageIds, "1", inInserts, inLossHomepages);
+            compareLogWithLocal(homePageLogs, dataBaseHomePageIds, LossTypeEnum.HOMEPAGE_LOSS.getKey(), inInserts, inLossHomepages);
         }
         if (ListUtil.isNotEmpty(behospitalCodeLogs)) {
-            compareLogWithLocal(behospitalCodeLogs, dataBaseBehospitalCodes, "2", inInserts, inLossCodes);
+            compareLogWithLocal(behospitalCodeLogs, dataBaseBehospitalCodes, LossTypeEnum.CODE_LOSS.getKey(), inInserts, inLossCodes);
         }
         if (ListUtil.isNotEmpty(inInserts)) {
             flag = blocklossResultServiceImpl.saveBatch(inInserts);
@@ -263,7 +272,7 @@ public class BlockLossManagementFacade {
                 logs.stream().forEach(rec -> {
                     //存在记录但是没有入库
                     if (!dataBases.contains(rec.getRecId())) {
-                        if (havingLossIds.contains(rec.getRecId())) {
+                        if (havingLossIds == null || !havingLossIds.contains(rec.getRecId())) {
                             BlocklossResult blocklossResult = new BlocklossResult();
                             blocklossResult.setBehospitalCode(rec.getBehospitalCode());
                             blocklossResult.setRecId(rec.getRecId());
@@ -277,31 +286,40 @@ public class BlockLossManagementFacade {
                     }
                 });
                 //判断只插入文书id的情况
-                List<String> havingRecIds = medicalRecordContentFacade.list(new QueryWrapper<MedicalRecordContent>()
-                        .select("rec_id")
-                        .in("rec_id", dataBases)).stream().map(MedicalRecordContent::getRecId).collect(Collectors.toList());
-                List<String> tempList = new ArrayList<>(dataBases);
-                tempList.removeAll(havingRecIds);
-                Map<String, GetOperationLogDTO> recMap = EntityUtil.makeEntityMap(logs, "recId");
-                tempList.stream().forEach(recId -> {
-                    BlocklossResult blocklossResult = new BlocklossResult();
-                    blocklossResult.setBehospitalCode(recMap.get(recId).getBehospitalCode());
-                    blocklossResult.setRecId(recId);
-                    blocklossResult.setRecTitle(recMap.get(recId).getRecTitle());
-                    blocklossResult.setLossWay(LossWayEnum.IN_LOSS.getKey());
-                    blocklossResult.setLossType(LossTypeEnum.REC_LOSS.getKey());
-                    blocklossResult.setLossCause("文书id插入成功,文书内容没有插入");
-                    //拼装病历数据块丢失明细其他信息
-                    assembleOtherBlocklossResult(blocklossResult);
-                    inInserts.add(blocklossResult);
-                });
+                //获取插入的文书
+                if(ListUtil.isNotEmpty(dataBases)){
+                    List<String> havingRecIds = medicalRecordContentFacade.list(new QueryWrapper<MedicalRecordContent>()
+                            .select("rec_id")
+                            .in("rec_id", dataBases)).stream().map(MedicalRecordContent::getRecId).collect(Collectors.toList());
+                    List<String> tempList = new ArrayList<>(dataBases);
+                    //移除查出来有内容的文书
+                    tempList.removeAll(havingRecIds);
+                    Map<String, GetOperationLogDTO> recMap = EntityUtil.makeEntityMap(logs, "recId");
+                    //有文书id无内容文书
+                    tempList.stream().forEach(recId -> {
+                        //没有被记录过
+                        if (havingLossIds == null || !havingLossIds.contains(recId)) {
+                            BlocklossResult blocklossResult = new BlocklossResult();
+                            blocklossResult.setBehospitalCode(recMap.get(recId).getBehospitalCode());
+                            blocklossResult.setRecId(recId);
+                            blocklossResult.setRecTitle(recMap.get(recId).getRecTitle());
+                            blocklossResult.setLossWay(LossWayEnum.IN_LOSS.getKey());
+                            blocklossResult.setLossType(LossTypeEnum.REC_LOSS.getKey());
+                            blocklossResult.setLossCause("文书id插入成功,文书内容没有插入");
+                            //拼装病历数据块丢失明细其他信息
+                            assembleOtherBlocklossResult(blocklossResult);
+                            inInserts.add(blocklossResult);
+                        }
+                    });
+                }
+
                 break;
             case "1":
                 //病案首页丢失
                 logs.stream().forEach(homePages -> {
                     //存在记录但是没有入库
                     if (!dataBases.contains(homePages.getRecId())) {
-                        if (havingLossIds.contains(homePages.getRecId())) {
+                        if (havingLossIds == null || !havingLossIds.contains(homePages.getHomePageId())) {
                             BlocklossResult blocklossResult = new BlocklossResult();
                             blocklossResult.setBehospitalCode(homePages.getBehospitalCode());
                             blocklossResult.setRecId(homePages.getHomePageId());
@@ -320,7 +338,7 @@ public class BlockLossManagementFacade {
                 logs.stream().forEach(beHehospitalInfo -> {
                     //存在记录但是没有入库
                     if (!dataBases.contains(beHehospitalInfo.getBehospitalCode())) {
-                        if (havingLossIds.contains(beHehospitalInfo.getBehospitalCode())) {
+                        if (havingLossIds == null || !havingLossIds.contains(beHehospitalInfo.getBehospitalCode())) {
                             BlocklossResult blocklossResult = new BlocklossResult();
                             blocklossResult.setBehospitalCode(beHehospitalInfo.getBehospitalCode());
                             blocklossResult.setLossWay(LossWayEnum.IN_LOSS.getKey());
@@ -352,7 +370,7 @@ public class BlockLossManagementFacade {
                 case "0":
                     //文书丢失
                     List<String> redIds = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
-                            .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                            .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                             .in("rec_id", lossResultMap.get(lossType).stream().map(BlocklossResult::getRecId).collect(Collectors.toList()))
                             .in("behospital_code", lossResultMap.get(lossType).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList()))
                             .eq("is_deleted", IsDeleteEnum.N.getKey()))
@@ -363,17 +381,18 @@ public class BlockLossManagementFacade {
                                 .set("solve_time", DateUtil.now())
                                 .set("gmt_modified", DateUtil.now())
                                 .set("status", LossStatusEnum.NOT_LOSS.getKey())
-                                .set("modifier", SysUserUtils.getCurrentPrincipleId())
+                                .set("modifier", SysUserUtils.getCurrentPrincipleId() != null ? SysUserUtils.getCurrentPrincipleId() + "" : "0")
+                                .eq("status", LossStatusEnum.IS_LOSS.getKey())
                                 .eq("loss_type", lossType)
                                 .eq("is_deleted", IsDeleteEnum.N.getKey())
-                                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                                .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                                 .in("rec_id", redIds)));
                     }
                     break;
                 case "1":
                     //病案首页丢失
                     List<String> homePages = homePageFacade.list(new QueryWrapper<HomePage>()
-                            .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                            .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                             .in("home_page_id", lossResultMap.get(lossType).stream().map(BlocklossResult::getRecId).collect(Collectors.toList()))
                             .in("behospital_code", lossResultMap.get(lossType).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList()))
                             .eq("is_deleted", IsDeleteEnum.N.getKey()))
@@ -385,9 +404,10 @@ public class BlockLossManagementFacade {
                                 .set("solve_time", DateUtil.now())
                                 .set("gmt_modified", DateUtil.now())
                                 .set("status", LossStatusEnum.NOT_LOSS.getKey())
-                                .set("modifier", SysUserUtils.getCurrentPrincipleId())
+                                .set("modifier", SysUserUtils.getCurrentPrincipleId() != null ? SysUserUtils.getCurrentPrincipleId() + "" : "0")
+                                .eq("status", LossStatusEnum.IS_LOSS.getKey())
                                 .eq("loss_type", lossType)
-                                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                                .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                                 .in("rec_id", homePages)
                                 .eq("is_deleted", IsDeleteEnum.N.getKey())));
                     }
@@ -395,7 +415,7 @@ public class BlockLossManagementFacade {
                 case "2":
                     //患者信息丢失
                     List<String> behospitalCodes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
-                            .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                            .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                             .in("behospital_code", lossResultMap.get(lossType).stream().map(BlocklossResult::getBehospitalCode).collect(Collectors.toList()))
                             .eq("is_deleted", IsDeleteEnum.N.getKey()))
                             .stream().map(BehospitalInfo::getBehospitalCode).collect(Collectors.toList());
@@ -405,10 +425,11 @@ public class BlockLossManagementFacade {
                                 .set("solve_time", DateUtil.now())
                                 .set("gmt_modified", DateUtil.now())
                                 .set("status", LossStatusEnum.NOT_LOSS.getKey())
-                                .set("modifier", SysUserUtils.getCurrentPrincipleId())
+                                .set("modifier", SysUserUtils.getCurrentPrincipleId() != null ? SysUserUtils.getCurrentPrincipleId() + "" : "0")
+                                .eq("status", LossStatusEnum.IS_LOSS.getKey())
                                 .eq("loss_type", lossType)
                                 .eq("is_deleted", IsDeleteEnum.N.getKey())
-                                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                                .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                                 .in("behospital_code", behospitalCodes)));
                     }
                     break;
@@ -429,6 +450,10 @@ public class BlockLossManagementFacade {
      */
     private void compareHisWithLog(List<GetOperationLogDTO> medicalRecords, List<GetOperationLogDTO> logs,
                                    String type, List<BlocklossResult> outInserts, List<String> havingLossIds) {
+        //his数据为空直接返回
+        if(ListUtil.isEmpty(medicalRecords)){
+            return;
+        }
         switch (type) {
             case "0":
                 List<String> recLogs = logs.stream().map(GetOperationLogDTO::getRecId).collect(Collectors.toList());
@@ -437,7 +462,7 @@ public class BlockLossManagementFacade {
                     if (StringUtil.isNotEmpty(medicalRecord.getRecId())) {
                         if (!recLogs.contains(medicalRecord.getRecId())) {
                             //该记录没有插入
-                            if (ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getRecId())) {
+                            if (havingLossIds == null || ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getRecId())) {
                                 BlocklossResult blocklossResult = new BlocklossResult();
                                 blocklossResult.setBehospitalCode(medicalRecord.getBehospitalCode());
                                 blocklossResult.setRecId(medicalRecord.getRecId());
@@ -457,7 +482,7 @@ public class BlockLossManagementFacade {
                 medicalRecords.stream().forEach(medicalRecord -> {
                     //病案首页不存在操作记录
                     if (StringUtil.isNotEmpty(medicalRecord.getHomePageId()) && !homepageLogs.contains(medicalRecord.getHomePageId())) {
-                        if (ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getHomePageId())) {
+                        if (havingLossIds == null || ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getHomePageId())) {
                             BlocklossResult blocklossResult = new BlocklossResult();
                             blocklossResult.setBehospitalCode(medicalRecord.getBehospitalCode());
                             blocklossResult.setRecId(medicalRecord.getHomePageId());
@@ -476,7 +501,7 @@ public class BlockLossManagementFacade {
                 medicalRecords.stream().forEach(medicalRecord -> {
                     //病历数据不存在操作记录
                     if (!behospitalCodeLogs.contains(medicalRecord.getBehospitalCode())) {
-                        if (ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getBehospitalCode())) {
+                        if (havingLossIds == null || ListUtil.isNotEmpty(havingLossIds) && !havingLossIds.contains(medicalRecord.getBehospitalCode())) {
                             BlocklossResult blocklossResult = new BlocklossResult();
                             blocklossResult.setBehospitalCode(medicalRecord.getBehospitalCode());
                             blocklossResult.setLossWay(LossWayEnum.OUT_LOSS.getKey());
@@ -527,8 +552,7 @@ public class BlockLossManagementFacade {
     private List<HisMedicalRecordDTO> getHisMedicalRecords(DataCompareVO dataCompareVO) {
         //技术服务部接口 /balance/data/getDataCount
         //###模拟
-
-        return new ArrayList<>();
+        return hisDataManagementFacade.getHisMedicalRecords(dataCompareVO);
     }
 
     /**
@@ -548,27 +572,27 @@ public class BlockLossManagementFacade {
         blockLossTypeGatherDTO.setLogNum(logNum);
         //获取该时间段的实际数量
         Integer codeNum = behospitalInfoFacade.count(new QueryWrapper<BehospitalInfo>()
-                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                .eq("hospital_id",SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                 .ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
                 .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
         Integer homePageNum = homePageFacade.count(new QueryWrapper<HomePage>()
-                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                 .ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
                 .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
         Integer recNum = medicalRecordFacade.count(new QueryWrapper<MedicalRecord>()
-                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                 .ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
                 .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
         blockLossTypeGatherDTO.setRealNum(codeNum + homePageNum + recNum);
         //获取该时间段的丢失数量
         List<BlocklossResult> blocklossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
-                .eq("hospital_id", SysUserUtils.getCurrentHospitalId())
+                .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                 .eq("status", LossStatusEnum.IS_LOSS.getKey())
                 .ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
                 .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
         Integer allLossNum = blocklossResults.size();
         blockLossTypeGatherDTO.setAllLossNum(allLossNum);
-        blockLossTypeGatherDTO.setHisNum(logNum + allLossNum);
+        blockLossTypeGatherDTO.setHisNum(codeNum + homePageNum + recNum + allLossNum);
 
         Map<String, List<BlocklossResult>> lossWayMap = EntityUtil.makeEntityListMap(blocklossResults, "lossWay");
         //外部丢失
@@ -623,6 +647,6 @@ public class BlockLossManagementFacade {
     public boolean dataRepari(DataRepariVO dataRepariVO) {
         //调用数据补录服务
 
-        return false;
+        return hisDataManagementFacade.dataRepari(dataRepariVO);
     }
 }

+ 203 - 0
daqe-center/src/main/java/com/lantone/daqe/facade/HisDataManagementFacade.java

@@ -0,0 +1,203 @@
+package com.lantone.daqe.facade;
+
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
+import com.lantone.common.enums.IsDeleteEnum;
+import com.lantone.common.exception.Asserts;
+import com.lantone.common.util.BeanUtil;
+import com.lantone.common.util.EntityUtil;
+import com.lantone.common.util.ListUtil;
+import com.lantone.common.vo.DataCompareVO;
+import com.lantone.common.vo.DataRepariVO;
+import com.lantone.daqe.dto.HisMedicalRecordDTO;
+import com.lantone.daqe.dto.HisRecDTO;
+import com.lantone.daqe.entity.BehospitalInfo;
+import com.lantone.daqe.entity.HisBehospitalInfo;
+import com.lantone.daqe.entity.HisHomePage;
+import com.lantone.daqe.entity.HisMedicalRecord;
+import com.lantone.daqe.entity.HisMedicalRecordContent;
+import com.lantone.daqe.entity.HomePage;
+import com.lantone.daqe.entity.MedicalRecord;
+import com.lantone.daqe.entity.MedicalRecordContent;
+import com.lantone.daqe.facade.base.HisBehospitalInfoFacade;
+import com.lantone.daqe.facade.base.HisHomePageFacade;
+import com.lantone.daqe.facade.base.HisMedicalRecordContentFacade;
+import com.lantone.daqe.facade.base.HisMedicalRecordFacade;
+import com.lantone.daqe.service.impl.BehospitalInfoServiceImpl;
+import com.lantone.daqe.service.impl.HomePageServiceImpl;
+import com.lantone.daqe.service.impl.MedicalRecordContentServiceImpl;
+import com.lantone.daqe.service.impl.MedicalRecordServiceImpl;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+/**
+ * @Description: His数据模拟对接-业务处理类
+ * @author: songxl
+ * @time: 2022/3/4 10:39
+ */
+@Component
+public class HisDataManagementFacade {
+    @Autowired
+    private HisBehospitalInfoFacade hisBehospitalInfoFacade;
+    @Autowired
+    private HisHomePageFacade hisHomePageFacade;
+    @Autowired
+    private HisMedicalRecordFacade hisMedicalRecordFacade;
+    @Autowired
+    private HisMedicalRecordContentFacade hisMedicalRecordContentFacade;
+
+    @Autowired
+    private BehospitalInfoServiceImpl behospitalInfoServiceImpl;
+    @Autowired
+    private HomePageServiceImpl homePageServiceImpl;
+    @Autowired
+    private MedicalRecordServiceImpl medicalRecordServiceImpl;
+    @Autowired
+    private MedicalRecordContentServiceImpl medicalRecordContentServiceImpl;
+
+
+    /**
+     * 数据补录
+     *
+     * @param dataRepariVO
+     * @Return boolean
+     */
+    public boolean dataRepari(DataRepariVO dataRepariVO) {
+        //=====获取his数据
+        //病历数据
+        List<HisBehospitalInfo> hisBehospitalInfos = hisBehospitalInfoFacade.list(new QueryWrapper<HisBehospitalInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .ge(dataRepariVO.getStartDate() != null && dataRepariVO.getBehospitalCode() == null, "behospital_date", dataRepariVO.getStartDate())
+                .le(dataRepariVO.getEndDate() != null && dataRepariVO.getBehospitalCode() == null, "behospital_date", dataRepariVO.getEndDate())
+                .eq(dataRepariVO.getBehospitalCode() != null, "behospital_code", dataRepariVO.getBehospitalCode()));
+        //病案首页
+        List<HisHomePage> hisHomePages = hisHomePageFacade.list(new QueryWrapper<HisHomePage>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .ge(dataRepariVO.getStartDate() != null && dataRepariVO.getBehospitalCode() == null, "behospital_date", dataRepariVO.getStartDate())
+                .le(dataRepariVO.getEndDate() != null && dataRepariVO.getBehospitalCode() == null, "behospital_date", dataRepariVO.getEndDate())
+                .eq(dataRepariVO.getBehospitalCode() != null, "behospital_code", dataRepariVO.getBehospitalCode())
+        );
+
+        //文书
+        List<HisMedicalRecord> hisMedicalRecords = hisMedicalRecordFacade.list(new QueryWrapper<HisMedicalRecord>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .ge(dataRepariVO.getStartDate() != null && dataRepariVO.getBehospitalCode() == null, "rec_date", dataRepariVO.getStartDate())
+                .le(dataRepariVO.getEndDate() != null && dataRepariVO.getBehospitalCode() == null, "rec_date", dataRepariVO.getEndDate())
+                .eq(dataRepariVO.getBehospitalCode() != null, "behospital_code", dataRepariVO.getBehospitalCode())
+        );
+        List<HisMedicalRecordContent> hisMedicalRecordContents = null;
+        if (ListUtil.isNotEmpty(hisMedicalRecords)) {
+            hisMedicalRecordContents = hisMedicalRecordContentFacade.list(new QueryWrapper<HisMedicalRecordContent>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .in("rec_id", hisMedicalRecords.stream().map(HisMedicalRecord::getRecId).collect(Collectors.toList())));
+        }
+
+        //=====删除该时间段插入我们库中的数据,重新插入
+        behospitalInfoServiceImpl.remove(new UpdateWrapper<BehospitalInfo>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .ge(dataRepariVO.getStartDate() != null && dataRepariVO.getBehospitalCode() == null, "gmt_create", dataRepariVO.getStartDate())
+                .le(dataRepariVO.getEndDate() != null && dataRepariVO.getBehospitalCode() == null, "gmt_create", dataRepariVO.getEndDate())
+                .eq(dataRepariVO.getBehospitalCode() != null, "behospital_code", dataRepariVO.getBehospitalCode()));
+        homePageServiceImpl.remove(new UpdateWrapper<HomePage>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .ge(dataRepariVO.getStartDate() != null && dataRepariVO.getBehospitalCode() == null, "gmt_create", dataRepariVO.getStartDate())
+                .le(dataRepariVO.getEndDate() != null && dataRepariVO.getBehospitalCode() == null, "gmt_create", dataRepariVO.getEndDate())
+                .eq(dataRepariVO.getBehospitalCode() != null, "behospital_code", dataRepariVO.getBehospitalCode()));
+        medicalRecordServiceImpl.remove(new UpdateWrapper<MedicalRecord>()
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .ge(dataRepariVO.getStartDate() != null && dataRepariVO.getBehospitalCode() == null, "gmt_create", dataRepariVO.getStartDate())
+                .le(dataRepariVO.getEndDate() != null && dataRepariVO.getBehospitalCode() == null, "gmt_create", dataRepariVO.getEndDate())
+                .eq(dataRepariVO.getBehospitalCode() != null, "behospital_code", dataRepariVO.getBehospitalCode()));
+        //删除改时间段文书内容
+        List<String> delRecIds = medicalRecordServiceImpl.list(new QueryWrapper<MedicalRecord>().select("rec_id")
+                .eq("is_deleted", IsDeleteEnum.N.getKey())
+                .ge(dataRepariVO.getStartDate() != null && dataRepariVO.getBehospitalCode() == null, "gmt_create", dataRepariVO.getStartDate())
+                .le(dataRepariVO.getEndDate() != null && dataRepariVO.getBehospitalCode() == null, "gmt_create", dataRepariVO.getEndDate())
+                .eq(dataRepariVO.getBehospitalCode() != null, "behospital_code", dataRepariVO.getBehospitalCode()))
+                .stream().map(MedicalRecord::getRecId).collect(Collectors.toList());
+        if (ListUtil.isNotEmpty(delRecIds)) {
+            medicalRecordContentServiceImpl.remove(new UpdateWrapper<MedicalRecordContent>()
+                    .eq("is_deleted", IsDeleteEnum.N.getKey())
+                    .in("rec_id", delRecIds));
+        }
+
+        //插入新查出的his数据
+        try {
+            behospitalInfoServiceImpl.saveBatch(BeanUtil.listCopyTo(hisBehospitalInfos, BehospitalInfo.class));
+            homePageServiceImpl.saveBatch(BeanUtil.listCopyTo(hisHomePages, HomePage.class));
+            medicalRecordServiceImpl.saveBatch(BeanUtil.listCopyTo(hisMedicalRecords, MedicalRecord.class));
+            if (ListUtil.isNotEmpty(hisMedicalRecordContents)) {
+                medicalRecordContentServiceImpl.saveBatch(BeanUtil.listCopyTo(hisMedicalRecordContents, MedicalRecordContent.class));
+            }
+        } catch (Exception e) {
+            Asserts.fail("文书批量插入过程出错");
+        }
+        return true;
+    }
+
+    /**
+     * 模拟获取his某段时间的数据
+     *
+     * @param dataCompareVO
+     * @Return java.util.List<com.lantone.daqe.dto.HisMedicalRecordDTO>
+     */
+    public List<HisMedicalRecordDTO> getHisMedicalRecords(DataCompareVO dataCompareVO) {
+        List<HisMedicalRecordDTO> out = new ArrayList<>();
+        //病历数据
+        List<String> codes = hisBehospitalInfoFacade.list(new QueryWrapper<HisBehospitalInfo>().select("behospital_code")
+                .eq(dataCompareVO.getHospitalId() != null, "hospital_id", dataCompareVO.getHospitalId())
+                .ge(dataCompareVO.getStartDate() != null && dataCompareVO.getBehospitalCode() == null, "behospital_date", dataCompareVO.getStartDate())
+                .le(dataCompareVO.getEndDate() != null && dataCompareVO.getBehospitalCode() == null, "behospital_date", dataCompareVO.getEndDate())
+                .eq(dataCompareVO.getBehospitalCode() != null, "behospital_code", dataCompareVO.getBehospitalCode())).stream().map(HisBehospitalInfo::getBehospitalCode).collect(Collectors.toList());
+        //通过病历获取病案首页和文书
+        if (ListUtil.isEmpty(codes)) {
+            return out;
+        }
+        //病案首页
+        List<HisHomePage> homePages = hisHomePageFacade.list(new QueryWrapper<HisHomePage>().select("home_page_id,behospital_code")
+                        .eq(dataCompareVO.getHospitalId() != null, "hospital_id", dataCompareVO.getHospitalId())
+                        .ge(dataCompareVO.getStartDate() != null && dataCompareVO.getBehospitalCode() == null, "behospital_date", dataCompareVO.getStartDate())
+                        .le(dataCompareVO.getEndDate() != null && dataCompareVO.getBehospitalCode() == null, "behospital_date", dataCompareVO.getEndDate())
+                        .eq(dataCompareVO.getBehospitalCode() != null, "behospital_code", dataCompareVO.getBehospitalCode())
+                //                .in("behospital_code", codes)
+        );
+        Map<String, List<HisHomePage>> homePageMap = EntityUtil.makeEntityListMap(homePages, "behospitalCode");
+
+        //文书
+        List<HisMedicalRecord> hisMedicalRecords = hisMedicalRecordFacade.list(new QueryWrapper<HisMedicalRecord>().select("rec_id,rec_title,behospital_code")
+                        .eq(dataCompareVO.getHospitalId() != null, "hospital_id", dataCompareVO.getHospitalId())
+                        .ge(dataCompareVO.getStartDate() != null && dataCompareVO.getBehospitalCode() == null, "rec_date", dataCompareVO.getStartDate())
+                        .le(dataCompareVO.getEndDate() != null && dataCompareVO.getBehospitalCode() == null, "rec_date", dataCompareVO.getEndDate())
+                        .eq(dataCompareVO.getBehospitalCode() != null, "behospital_code", dataCompareVO.getBehospitalCode())
+                //                .in("behospital_code", codes)
+        );
+        Map<String, List<HisMedicalRecord>> medicalRecordMap = EntityUtil.makeEntityListMap(hisMedicalRecords, "behospitalCode");
+
+        //拼装
+        codes.stream().forEach(code -> {
+            HisMedicalRecordDTO oneData = new HisMedicalRecordDTO();
+            oneData.setBehospitalCode(code);
+            if (homePageMap != null && ListUtil.isNotEmpty(homePageMap.get(code))) {
+                oneData.setHomePageId(homePageMap.get(code).get(0).getHomePageId());
+            }
+            List<HisRecDTO> recs = new ArrayList<>();
+            if (medicalRecordMap != null && ListUtil.isNotEmpty(medicalRecordMap.get(code))) {
+                medicalRecordMap.get(code).stream().forEach(hisMedicalRecord -> {
+                    HisRecDTO rec = new HisRecDTO();
+                    rec.setRecId(hisMedicalRecord.getRecId());
+                    rec.setRecTitle(hisMedicalRecord.getRecTitle());
+                    recs.add(rec);
+                });
+                oneData.setHisRecs(recs);
+            }
+            out.add(oneData);
+        });
+        return out;
+    }
+}

+ 4 - 4
daqe-center/src/main/resources/mapper/BlocklossResultMapper.xml

@@ -36,16 +36,16 @@
         <if test="getBlockLossPageVO.recTitle != null and getBlockLossPageVO.recTitle != ''">
             AND rec_title LIKE CONCAT('%',#{getBlockLossPageVO.recTitle},'%')
         </if>
-        <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
+        <if test="getBlockLossPageVO.lossType != null and getBlockLossPageVO.lossType != ''">
             AND loss_type = #{getBlockLossPageVO.lossType}
         </if>
-        <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
+        <if test="getBlockLossPageVO.lossWay != null and getBlockLossPageVO.lossWay != ''">
             AND loss_way = #{getBlockLossPageVO.lossWay}
         </if>
-        <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
+        <if test="getBlockLossPageVO.isAudited != null and getBlockLossPageVO.isAudited != ''">
             AND is_audited = #{getBlockLossPageVO.isAudited}
         </if>
-        <if test="getBlockLossPageVO.recId != null and getBlockLossPageVO.recId != ''">
+        <if test="getBlockLossPageVO.status != null and getBlockLossPageVO.status != ''">
             AND `status` = #{getBlockLossPageVO.status}
         </if>
     </select>

+ 1 - 0
daqe-center/src/main/resources/upgrade/V1__daqe_init.sql

@@ -397,6 +397,7 @@ CREATE TABLE `base_concept_library` (
   `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
   `standard` varchar(128) NOT NULL COMMENT '标准词',
   `synonym` varchar(128) NOT NULL COMMENT '同义词',
+  `spell` varchar(128) DEFAULT NULL COMMENT '同义词的拼音首字母(大写)',
   `type` varchar(2) NOT NULL COMMENT '术语类型,1:诊断,2:手术,3:药品',
   `is_deleted` char(1) NOT NULL DEFAULT 'N' COMMENT '是否删除,N:未删除,Y:删除',
   `gmt_create` datetime NOT NULL DEFAULT '1970-01-01 12:00:00' COMMENT '记录创建时间',

+ 1 - 0
security-center/src/main/java/com/lantone/security/facade/LogManagementFacade.java

@@ -151,6 +151,7 @@ public class LogManagementFacade {
                     getOperationLogDTO.setHomePageId(temp.getString("homePageId"));
                     getOperationLogDTO.setRecId(temp.getString("recId"));
                     getOperationLogDTO.setRecTitle(temp.getString("recTitle"));
+                    out.add(getOperationLogDTO);
                 }
             });
         }