update 字典翻译排序异常处理

This commit is contained in:
liao
2023-09-20 09:16:20 +08:00
parent fa10c29df3
commit b29fec19cc
5 changed files with 10 additions and 2 deletions
@@ -17,6 +17,7 @@ public class ResultCommon {
public static final String EMPTY_STANDARD_NAME = "message.empty.standard.name"; // 标准名称不能为空
public static final String EMPTY_COMMON = "message.empty.common"; // {0}不能为空
public static final String EXIST_STANDARD_NUMBER = "message.exists.standard.number"; // 标准编号已经存在
public static final String NOT_EXIST_PARAM = "message.no.exists.param"; // 参数{0}不存在
public static final String RMR_SET_QUALITY_OVER_TEN = "es.rmr.setQuality.overTen"; // 请最多选择10条
@@ -899,8 +899,12 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
String orderByField = (String) parameterMap.get(FieldCommon.ORDER_BY_FIELD);
if (StringUtils.isNotBlank(orderByField)) {
// 排序字段的类型
String fieldShowType = fieldList.stream().filter(lawsTag -> orderByField
.equals(lawsTag.getDbFieldName())).collect(Collectors.toList()).get(0).getFieldShowType();
List<LawsTag> lawsTagList = fieldList.stream().filter(lawsTag -> orderByField
.equals(lawsTag.getDbFieldName())).collect(Collectors.toList());
if (CollectionUtils.isEmpty(lawsTagList)) {
throw new JeroBootException(ResultCommon.NOT_EXIST_PARAM, orderByField);
}
String fieldShowType = lawsTagList.get(0).getFieldShowType();
if (LawsFieldTypeEnum.DATE_MANY.getValue().equals(fieldShowType)) {
// 多日期的排序逻辑不一样
orderBySortDateMany(parameterMap, selectCondition);