|
@@ -4,6 +4,7 @@ package com.lantone.daqe.facade;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
|
|
+import com.google.common.collect.Lists;
|
|
import com.lantone.common.enums.IsDeleteEnum;
|
|
import com.lantone.common.enums.IsDeleteEnum;
|
|
import com.lantone.common.util.BeanUtil;
|
|
import com.lantone.common.util.BeanUtil;
|
|
import com.lantone.common.util.DateUtil;
|
|
import com.lantone.common.util.DateUtil;
|
|
@@ -102,7 +103,7 @@ public class BlockLossManagementFacade {
|
|
//====1.获取已丢失状态记录,去数据库中对比判断是否补录
|
|
//====1.获取已丢失状态记录,去数据库中对比判断是否补录
|
|
List<BlocklossResult> lossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
|
|
List<BlocklossResult> lossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
|
|
.ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
.ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
- .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
|
|
|
|
+ .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
|
|
.eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
.eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()));
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()));
|
|
Map<String, List<BlocklossResult>> lossResultMap = null;
|
|
Map<String, List<BlocklossResult>> lossResultMap = null;
|
|
@@ -134,7 +135,7 @@ public class BlockLossManagementFacade {
|
|
List<String> dataBaseBehospitalCodes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
|
|
List<String> dataBaseBehospitalCodes = behospitalInfoFacade.list(new QueryWrapper<BehospitalInfo>()
|
|
.select("behospital_code")
|
|
.select("behospital_code")
|
|
.ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
.ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
- .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
|
|
|
|
+ .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
.stream().map(BehospitalInfo::getBehospitalCode).collect(Collectors.toList());
|
|
.stream().map(BehospitalInfo::getBehospitalCode).collect(Collectors.toList());
|
|
@@ -142,7 +143,7 @@ public class BlockLossManagementFacade {
|
|
List<String> dataBaseHomePageIds = homePageFacade.list(new QueryWrapper<HomePage>()
|
|
List<String> dataBaseHomePageIds = homePageFacade.list(new QueryWrapper<HomePage>()
|
|
.select("home_page_id")
|
|
.select("home_page_id")
|
|
.ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
.ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
- .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
|
|
|
|
+ .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
.stream().map(HomePage::getHomePageId).collect(Collectors.toList());
|
|
.stream().map(HomePage::getHomePageId).collect(Collectors.toList());
|
|
@@ -151,7 +152,7 @@ public class BlockLossManagementFacade {
|
|
List<String> dataBaseRecIds = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
|
|
List<String> dataBaseRecIds = medicalRecordFacade.list(new QueryWrapper<MedicalRecord>()
|
|
.select("rec_id")
|
|
.select("rec_id")
|
|
.ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
.ge(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
- .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getStartDate())
|
|
|
|
|
|
+ .le(dataCompareVO.getStartDate() != null, "gmt_create", dataCompareVO.getEndDate())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
.eq("is_deleted", IsDeleteEnum.N.getKey()))
|
|
.stream().map(MedicalRecord::getRecId).collect(Collectors.toList());
|
|
.stream().map(MedicalRecord::getRecId).collect(Collectors.toList());
|
|
@@ -535,6 +536,10 @@ public class BlockLossManagementFacade {
|
|
* @Return com.lantone.daqe.dto.BlockLossTypeGatherDTO
|
|
* @Return com.lantone.daqe.dto.BlockLossTypeGatherDTO
|
|
*/
|
|
*/
|
|
public BlockLossTypeGatherDTO blockLossTypeGather(BlockLossTypeGatherVO blockLossTypeGatherVO) {
|
|
public BlockLossTypeGatherDTO blockLossTypeGather(BlockLossTypeGatherVO blockLossTypeGatherVO) {
|
|
|
|
+ blockLossTypeGatherVO.setOperationUrls(Lists.newArrayList("save/saveBehospitalCode",
|
|
|
|
+ "save/saveHomePages",
|
|
|
|
+ "save/saveRecs"));
|
|
|
|
+
|
|
BlockLossTypeGatherDTO blockLossTypeGatherDTO = new BlockLossTypeGatherDTO();
|
|
BlockLossTypeGatherDTO blockLossTypeGatherDTO = new BlockLossTypeGatherDTO();
|
|
//获取该时间段的日志数量
|
|
//获取该时间段的日志数量
|
|
Integer logNum = operationLogService.getOperationLogNum(blockLossTypeGatherVO).getData();
|
|
Integer logNum = operationLogService.getOperationLogNum(blockLossTypeGatherVO).getData();
|
|
@@ -543,22 +548,22 @@ public class BlockLossManagementFacade {
|
|
Integer codeNum = behospitalInfoFacade.count(new QueryWrapper<BehospitalInfo>()
|
|
Integer codeNum = behospitalInfoFacade.count(new QueryWrapper<BehospitalInfo>()
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
.ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
- .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate()));
|
|
|
|
|
|
+ .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
|
|
Integer homePageNum = homePageFacade.count(new QueryWrapper<HomePage>()
|
|
Integer homePageNum = homePageFacade.count(new QueryWrapper<HomePage>()
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
.ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
- .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate()));
|
|
|
|
|
|
+ .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
|
|
Integer recNum = medicalRecordFacade.count(new QueryWrapper<MedicalRecord>()
|
|
Integer recNum = medicalRecordFacade.count(new QueryWrapper<MedicalRecord>()
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
.ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
- .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate()));
|
|
|
|
|
|
+ .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
|
|
blockLossTypeGatherDTO.setRealNum(codeNum + homePageNum + recNum);
|
|
blockLossTypeGatherDTO.setRealNum(codeNum + homePageNum + recNum);
|
|
//获取该时间段的丢失数量
|
|
//获取该时间段的丢失数量
|
|
List<BlocklossResult> blocklossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
|
|
List<BlocklossResult> blocklossResults = blocklossResultFacade.list(new QueryWrapper<BlocklossResult>()
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("hospital_id", SysUserUtils.getCurrentHospitalId())
|
|
.eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
.eq("status", LossStatusEnum.IS_LOSS.getKey())
|
|
.ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
.ge(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate())
|
|
- .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getStartDate()));
|
|
|
|
|
|
+ .le(blockLossTypeGatherVO.getStartDate() != null, "gmt_create", blockLossTypeGatherVO.getEndDate()));
|
|
Integer allLossNum = blocklossResults.size();
|
|
Integer allLossNum = blocklossResults.size();
|
|
blockLossTypeGatherDTO.setAllLossNum(allLossNum);
|
|
blockLossTypeGatherDTO.setAllLossNum(allLossNum);
|
|
blockLossTypeGatherDTO.setHisNum(logNum + allLossNum);
|
|
blockLossTypeGatherDTO.setHisNum(logNum + allLossNum);
|