解决数据管控基础数据资源列表输入关键字查询不生效的bug

master
guoxin 1 year ago
parent 4d6eb25372
commit a8c77e3d9b
  1. 1
      shandan-control/src/main/resources/static/js/directory/directory-basicdata.js
  2. 7
      shandan-system/src/main/java/com/keyware/shandan/bianmu/service/impl/DirectoryTableServiceImpl.java

@ -57,7 +57,6 @@ function startRender() {
{field: 'formComment', title: '表单名称'}, {field: 'formComment', title: '表单名称'},
{field: 'createUserName', title: '操作用户'}, {field: 'createUserName', title: '操作用户'},
{field: 'createTime', title: '关联时间'}, {field: 'createTime', title: '关联时间'},
{ {
fixed: 'right', fixed: 'right',
title: '操作', title: '操作',

@ -14,6 +14,7 @@ import org.springframework.beans.factory.annotation.Autowired;
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.Assert; import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -54,6 +55,12 @@ public class DirectoryTableServiceImpl extends BaseServiceImpl<DirectoryTableMap
dirIds.add(table.getDirId()); dirIds.add(table.getDirId());
wrapper.clear(); wrapper.clear();
wrapper.in("DIRECTORY_ID", dirIds); wrapper.in("DIRECTORY_ID", dirIds);
if (StringUtils.hasText(table.getFormComment())) {
wrapper.and(subWrapper -> subWrapper
.like("FORM_COMMENT", table.getFormComment())
.or()
.like("FORM_NAME", table.getFormComment()));
}
return super.page(page, wrapper); return super.page(page, wrapper);
} }