|
@@ -150,7 +150,7 @@ public class PushFacade {
|
|
|
throw new CommonException(CommonErrorCode.SERVER_IS_ERROR, "推送服务出错" + e.getMessage());
|
|
|
}
|
|
|
// 诊断去重、合并处理
|
|
|
- dealDisease(pushDTO);
|
|
|
+ dealDisease(pushDTO, pushVo.getLength());
|
|
|
}
|
|
|
|
|
|
// 通过诊断反推
|
|
@@ -168,7 +168,7 @@ public class PushFacade {
|
|
|
* 诊断去重、合并处理
|
|
|
* @param pushDTO
|
|
|
*/
|
|
|
- public void dealDisease(PushDTO pushDTO) {
|
|
|
+ public void dealDisease(PushDTO pushDTO, int length) {
|
|
|
Map<String, List<PushBaseDTO>> dis = pushDTO.getDis();
|
|
|
List<PushBaseDTO> possibleUnion = Lists.newArrayList(); // 可能诊断 = 确诊 + 拟诊 + 大数据推送诊断
|
|
|
List<PushBaseDTO> definite = dis.get(DiagnoseTypeEnum.definite.getName()); // 确诊
|
|
@@ -196,6 +196,7 @@ public class PushFacade {
|
|
|
diseaseNameList.add(bean.getName());
|
|
|
}
|
|
|
}
|
|
|
+ possibleUnion = possibleUnion.size() > length ? possibleUnion.subList(0, length) : possibleUnion;
|
|
|
// 添加可能诊断
|
|
|
dis.put(DiagnoseTypeEnum.possibleUnion.getName(), possibleUnion);
|
|
|
// 如果需要删除诊断,就用以下代码
|