|
|
|
@ -2,22 +2,23 @@ package com.emr.service.tScanAssort;
|
|
|
|
|
|
|
|
|
|
|
|
import com.emr.dao.CommomMapper;
|
|
|
|
import com.emr.dao.CommomMapper;
|
|
|
|
import com.emr.dao.tScanAssort.T_Scan_AssortMapper;
|
|
|
|
import com.emr.dao.tScanAssort.T_Scan_AssortMapper;
|
|
|
|
|
|
|
|
import com.emr.dto.PatInfoEmrTypeDto;
|
|
|
|
import com.emr.entity.tScanAssort.T_Scan_Assort;
|
|
|
|
import com.emr.entity.tScanAssort.T_Scan_Assort;
|
|
|
|
|
|
|
|
import com.emr.vo.*;
|
|
|
|
import com.emr.vo.FontVo.ScanAssortVo;
|
|
|
|
import com.emr.vo.FontVo.ScanAssortVo;
|
|
|
|
import com.emr.vo.IndexFds;
|
|
|
|
import com.emr.vo.commomSearch.CommomTree;
|
|
|
|
import com.emr.vo.PatientAssortVo;
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
import com.emr.vo.PicListVo;
|
|
|
|
|
|
|
|
import com.emr.vo.ZhFyImageVo;
|
|
|
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
import org.springframework.util.DigestUtils;
|
|
|
|
import org.springframework.util.DigestUtils;
|
|
|
|
|
|
|
|
import org.springframework.util.ObjectUtils;
|
|
|
|
|
|
|
|
|
|
|
|
import java.io.File;
|
|
|
|
import java.io.File;
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.*;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @ProjectName:
|
|
|
|
* @ProjectName:
|
|
|
|
@ -198,6 +199,54 @@ public class T_Scan_AssortServiceImpl implements T_Scan_AssortService {
|
|
|
|
return scanAssortMapper.getAssortListByPatientAssortPage(patientId, assortId, scanPage);
|
|
|
|
return scanAssortMapper.getAssortListByPatientAssortPage(patientId, assortId, scanPage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public List<PatInfoEmrTypeVo> getScanAssortPageByPatEmrType(PatInfoEmrTypeDto patInfoEmrTypeDto) {
|
|
|
|
|
|
|
|
List<PatScanAssortVo> patScanAssortVos = scanAssortMapper.getScanAssortPageByPatEmrTyp(patInfoEmrTypeDto);
|
|
|
|
|
|
|
|
//按打印用途分组去重
|
|
|
|
|
|
|
|
Map<Integer, Set<PatScanAssortVo>> groupMap = patScanAssortVos.stream()
|
|
|
|
|
|
|
|
.collect(Collectors.groupingBy(PatScanAssortVo::getTypeId,
|
|
|
|
|
|
|
|
Collectors.toCollection(() -> new LinkedHashSet<>())));
|
|
|
|
|
|
|
|
//病案分类去重
|
|
|
|
|
|
|
|
List<PatInfoEmrTypeVo> patInfoEmrTypeVoList = new ArrayList<>();
|
|
|
|
|
|
|
|
//返回病案分类对象
|
|
|
|
|
|
|
|
PatInfoEmrTypeVo patInfoEmrTypeVo = null;
|
|
|
|
|
|
|
|
for (Map.Entry<Integer, Set<PatScanAssortVo>> map : groupMap.entrySet()) {
|
|
|
|
|
|
|
|
Integer typeId = map.getKey();
|
|
|
|
|
|
|
|
Set<PatScanAssortVo> dataList = map.getValue();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//打印用途分类下病案总页数
|
|
|
|
|
|
|
|
int pageTotal = 0;
|
|
|
|
|
|
|
|
//病案分类列表
|
|
|
|
|
|
|
|
List<PatScanAssort> patScanAssortList = new ArrayList<>();
|
|
|
|
|
|
|
|
PatScanAssort patScanAssort = null;
|
|
|
|
|
|
|
|
//转换成病案分类List
|
|
|
|
|
|
|
|
for (PatScanAssortVo scanAssortVo : dataList) {
|
|
|
|
|
|
|
|
String assortId = scanAssortVo.getAssortId();
|
|
|
|
|
|
|
|
String assortName = scanAssortVo.getAssortName();
|
|
|
|
|
|
|
|
//病案分类页数
|
|
|
|
|
|
|
|
int pageNumber = 0;
|
|
|
|
|
|
|
|
for (PatScanAssortVo assortVo : patScanAssortVos) {
|
|
|
|
|
|
|
|
if (!ObjectUtils.isEmpty(scanAssortVo.getTypeId()) && StringUtils.isNotBlank(assortVo.getAssortId()) && assortVo.getAssortId().equals(assortId) && assortVo.getTypeId().equals(typeId)) {
|
|
|
|
|
|
|
|
pageNumber++;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
patScanAssort = new PatScanAssort();
|
|
|
|
|
|
|
|
patScanAssort.setAssortId(assortId);
|
|
|
|
|
|
|
|
patScanAssort.setAssortName(assortName);
|
|
|
|
|
|
|
|
patScanAssort.setPageNumber(pageNumber);
|
|
|
|
|
|
|
|
patScanAssortList.add(patScanAssort);
|
|
|
|
|
|
|
|
pageTotal += pageNumber;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
patInfoEmrTypeVo = new PatInfoEmrTypeVo();
|
|
|
|
|
|
|
|
patInfoEmrTypeVo.setScanAssortList(patScanAssortList);
|
|
|
|
|
|
|
|
patInfoEmrTypeVo.setPageTotal(pageTotal);
|
|
|
|
|
|
|
|
patInfoEmrTypeVo.setTypeId(typeId);
|
|
|
|
|
|
|
|
patInfoEmrTypeVoList.add(patInfoEmrTypeVo);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return patInfoEmrTypeVoList;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private String selectRootByNotWater(String srcPath) {
|
|
|
|
private String selectRootByNotWater(String srcPath) {
|
|
|
|
//获取盘符
|
|
|
|
//获取盘符
|
|
|
|
String str = srcPath.substring(0, 1).toUpperCase();
|
|
|
|
String str = srcPath.substring(0, 1).toUpperCase();
|
|
|
|
|