|
@@ -27,7 +27,7 @@ import java.util.*;
|
|
|
/**
|
|
|
* <p>
|
|
|
* 质控评分结果信息
|
|
|
-每次评分增加一条信息,前面所有评分is_deleted全部设置为Y 服务实现类
|
|
|
+ * 每次评分增加一条信息,前面所有评分is_deleted全部设置为Y 服务实现类
|
|
|
* </p>
|
|
|
*
|
|
|
* @author zhoutg
|
|
@@ -209,41 +209,41 @@ public class QcresultInfoServiceImpl extends ServiceImpl<QcresultInfoMapper, Qcr
|
|
|
*/
|
|
|
@Override
|
|
|
public IPage<EntryNumDTO> entryGroupByEntryInnerPage(@Param("filterPageVO") FilterPageVO filterPageVO) {
|
|
|
- //基础数据
|
|
|
- IPage<EntryNumDTO> entryNumDTOIPage = baseMapper.entryGroupByEntryInnerPage(filterPageVO);
|
|
|
+ //基础数据
|
|
|
+ IPage<EntryNumDTO> entryNumDTOIPage = baseMapper.entryGroupByEntryInnerPage(filterPageVO);
|
|
|
+ List<EntryNumDTO> records = entryNumDTOIPage.getRecords();
|
|
|
+ if (CollectionUtils.isEmpty(records)) {
|
|
|
+ return entryNumDTOIPage;
|
|
|
+ }
|
|
|
String hospitalId = filterPageVO.getHospitalId();
|
|
|
//缺陷总数
|
|
|
- Integer sumInteget = baseMapper.entryGroupByEntrySum(filterPageVO.getHospitalId(),filterPageVO.getIsPlacefile(),
|
|
|
- filterPageVO.getStartDate(),filterPageVO.getEndDate());
|
|
|
+ Integer sumInteget = baseMapper.entryGroupByEntrySum(filterPageVO.getHospitalId(), filterPageVO.getIsPlacefile(),
|
|
|
+ filterPageVO.getStartDate(), filterPageVO.getEndDate());
|
|
|
float nsum = 0;
|
|
|
- Set<Long> ids = new HashSet<Long>();
|
|
|
- List<EntryNumDTO> records = entryNumDTOIPage.getRecords();
|
|
|
- if(CollectionUtils.isEmpty(records)){
|
|
|
- return null;
|
|
|
- }
|
|
|
+ Set<Long> ids = new HashSet<Long>();
|
|
|
for (EntryNumDTO record : records) {
|
|
|
ids.add(record.getId());
|
|
|
int num = record.getNum().intValue();
|
|
|
- if(sumInteget!=null && sumInteget!=0 ){
|
|
|
+ if (sumInteget != null && sumInteget != 0) {
|
|
|
int sum = sumInteget.intValue();
|
|
|
- nsum =(float) num/sum;
|
|
|
+ nsum = (float) num / sum;
|
|
|
}
|
|
|
DecimalFormat df = new DecimalFormat("0.00");
|
|
|
- String percent = df.format(nsum*100);
|
|
|
- record.setPercentStr(percent+"%");
|
|
|
+ String percent = df.format(nsum * 100);
|
|
|
+ record.setPercentStr(percent + "%");
|
|
|
record.setTotleNum(sumInteget);
|
|
|
}
|
|
|
//缺陷分值
|
|
|
String isPlacefile = filterPageVO.getIsPlacefile();
|
|
|
List<EntryNumDTO> entryScore = new ArrayList<>();
|
|
|
- entryScore = baseMapper.entryGroupByEntryScore(hospitalId,isPlacefile, ids);
|
|
|
+ entryScore = baseMapper.entryGroupByEntryScore(hospitalId, isPlacefile, ids);
|
|
|
for (EntryNumDTO record : records) {
|
|
|
for (EntryNumDTO entryNumDTO : entryScore) {
|
|
|
- if(record.getId().equals(entryNumDTO.getId())){
|
|
|
- record.setScore(entryNumDTO.getScore());
|
|
|
- }
|
|
|
+ if (record.getId().equals(entryNumDTO.getId())) {
|
|
|
+ record.setScore(entryNumDTO.getScore());
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
return entryNumDTOIPage;
|
|
|
}
|
|
|
|
|
@@ -282,6 +282,7 @@ public class QcresultInfoServiceImpl extends ServiceImpl<QcresultInfoMapper, Qcr
|
|
|
|
|
|
/**
|
|
|
* 各科室甲/乙/丙级病历占比
|
|
|
+ *
|
|
|
* @param filterVO
|
|
|
* @return
|
|
|
*/
|