songxinlu 3 лет назад
Родитель
Сommit
6df5d0222e

+ 5 - 7
daqe-center/src/main/java/com/lantone/daqe/facade/BlockLossManagementFacade.java

@@ -107,8 +107,6 @@ public class BlockLossManagementFacade {
         //====1.获取已丢失状态记录,去数据库中对比判断是否补录
         List<BlocklossResult> lossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
                 .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()));
@@ -152,9 +150,9 @@ public class BlockLossManagementFacade {
         //病历数据
         List<String> dataBaseBehospitalCodes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
                 .select("behospital_code")
-                .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())
+                .ge(dataCompareVO.getStartDate() != null && StringUtil.isBlank(dataCompareVO.getBehospitalCode()), "gmt_create", dataCompareVO.getStartDate())
+                .le(dataCompareVO.getEndDate() != null && StringUtil.isBlank(dataCompareVO.getBehospitalCode()), "gmt_create", dataCompareVO.getEndDate())
+                .eq(StringUtil.isNotBlank(dataCompareVO.getBehospitalCode()), "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());
@@ -624,7 +622,7 @@ public class BlockLossManagementFacade {
         List<String> codes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
                 .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                 .ge(blockLossTypeGatherVO.getStartDate() != null, "behospital_date", blockLossTypeGatherVO.getStartDate())
-                .le(blockLossTypeGatherVO.getStartDate() != null, "behospital_date", blockLossTypeGatherVO.getEndDate()))
+                .le(blockLossTypeGatherVO.getEndDate() != null, "behospital_date", blockLossTypeGatherVO.getEndDate()))
                 .stream().map(BehospitalInfo::getBehospitalCode).collect(Collectors.toList());
 
         Integer codeNum = codes.size();
@@ -645,7 +643,7 @@ public class BlockLossManagementFacade {
                 .eq("hospital_id", SysUserUtils.getCurrentHospitalId() != null ? SysUserUtils.getCurrentHospitalId() : 0)
                 .eq("status", LossStatusEnum.IS_LOSS.getKey())
                 .ge(blockLossTypeGatherVO.getStartDate() != null, "behospital_date", blockLossTypeGatherVO.getStartDate())
-                .le(blockLossTypeGatherVO.getStartDate() != null, "behospital_date", blockLossTypeGatherVO.getEndDate()));
+                .le(blockLossTypeGatherVO.getEndDate() != null, "behospital_date", blockLossTypeGatherVO.getEndDate()));
         Integer allLossNum = blocklossResults.size();
         blockLossTypeGatherDTO.setAllLossNum(allLossNum);
         //        blockLossTypeGatherDTO.setHisNum(codeNum + homePageNum + recNum + allLossNum);

+ 7 - 6
daqe-center/src/main/java/com/lantone/daqe/facade/HisDataManagementFacade.java

@@ -8,6 +8,7 @@ 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.util.StringUtil;
 import com.lantone.common.vo.DataCompareVO;
 import com.lantone.common.vo.DataRepariVO;
 import com.lantone.daqe.dto.HisMedicalRecordDTO;
@@ -73,9 +74,9 @@ public class HisDataManagementFacade {
         //病历数据
         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()));
+                .ge(dataRepariVO.getStartDate() != null && StringUtil.isBlank(dataRepariVO.getBehospitalCode()), "behospital_date", dataRepariVO.getStartDate())
+                .le(dataRepariVO.getEndDate() != null && StringUtil.isBlank(dataRepariVO.getBehospitalCode()), "behospital_date", dataRepariVO.getEndDate())
+                .eq(StringUtil.isNotBlank(dataRepariVO.getBehospitalCode()), "behospital_code", dataRepariVO.getBehospitalCode()));
         //通过病历获取病案首页和文书
         if (ListUtil.isEmpty(hisBehospitalInfos)) {
             return true;
@@ -146,9 +147,9 @@ public class HisDataManagementFacade {
         //病历数据
         List<HisBehospitalInfo> hisBehospitalInfos = hisBehospitalInfoFacade.list(new QueryWrapper<HisBehospitalInfo>().select("behospital_code,behospital_date")
                 .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()));
+                .ge(dataCompareVO.getStartDate() != null && StringUtil.isBlank(dataCompareVO.getBehospitalCode()), "behospital_date", dataCompareVO.getStartDate())
+                .le(dataCompareVO.getEndDate() != null && StringUtil.isBlank(dataCompareVO.getBehospitalCode()), "behospital_date", dataCompareVO.getEndDate())
+                .eq(StringUtil.isNotBlank(dataCompareVO.getBehospitalCode()), "behospital_code", dataCompareVO.getBehospitalCode()));
         //通过病历获取病案首页和文书
         if (ListUtil.isEmpty(hisBehospitalInfos)) {
             return out;

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

@@ -138,9 +138,9 @@ public class LogManagementFacade {
         List<GetOperationLogDTO> out = new ArrayList<>();
         List<String> operationParams = operationLogFacade.list(new QueryWrapper<OperationLog>()
                 .select("operation_param")
-                .ge(dataCompareVO.getStartDate() != null && dataCompareVO.getBehospitalCode() == null && ListUtil.isEmpty(dataCompareVO.getBehospitalCodes()), "gmt_create", dataCompareVO.getStartDate())
-                .le(dataCompareVO.getStartDate() != null && dataCompareVO.getBehospitalCode() == null && ListUtil.isEmpty(dataCompareVO.getBehospitalCodes()), "gmt_create", dataCompareVO.getEndDate())
-                .eq(dataCompareVO.getBehospitalCode() != null, "behospital_code", dataCompareVO.getBehospitalCode())
+                .ge(dataCompareVO.getStartDate() != null && StringUtil.isBlank(dataCompareVO.getBehospitalCode()) && ListUtil.isEmpty(dataCompareVO.getBehospitalCodes()), "gmt_create", dataCompareVO.getStartDate())
+                .le(dataCompareVO.getEndDate() != null && StringUtil.isBlank(dataCompareVO.getBehospitalCode()) && ListUtil.isEmpty(dataCompareVO.getBehospitalCodes()), "gmt_create", dataCompareVO.getEndDate())
+                .eq(StringUtil.isNotBlank(dataCompareVO.getBehospitalCode()), "behospital_code", dataCompareVO.getBehospitalCode())
                 .in(ListUtil.isNotEmpty(dataCompareVO.getBehospitalCodes()), "remark", dataCompareVO.getBehospitalCodes())
                 .eq("operation_url", dataCompareVO.getOperationUrl()))
                 .stream().map(OperationLog::getOperationParam).collect(Collectors.toList());