查询条件如区域、公司、配置、机构、岗位、栏目、站点、分类等显示编码使用 like 查询,等其它功能查询细节优化
This commit is contained in:
@@ -71,6 +71,14 @@ public class BizCategory extends TreeEntity<BizCategory> {
|
||||
this.viewCode = viewCode;
|
||||
}
|
||||
|
||||
public String getViewCode_like() {
|
||||
return sqlMap().getWhere().getValue("view_code", QueryType.LIKE);
|
||||
}
|
||||
|
||||
public void setViewCode_like(String viewCode) {
|
||||
sqlMap().getWhere().and("view_code", QueryType.LIKE, viewCode);
|
||||
}
|
||||
|
||||
@NotBlank(message="分类名称不能为空")
|
||||
@Size(min=0, max=64, message="分类名称长度不能超过 64 个字符")
|
||||
public String getCategoryName() {
|
||||
|
||||
@@ -77,13 +77,10 @@ public class BizCategoryController extends BaseController {
|
||||
if (StringUtils.isBlank(bizCategory.getParentCode())) {
|
||||
bizCategory.setParentCode(BizCategory.ROOT_CODE);
|
||||
}
|
||||
if (StringUtils.isNotBlank(bizCategory.getViewCode())) {
|
||||
bizCategory.setParentCode(null);
|
||||
}
|
||||
if (StringUtils.isNotBlank(bizCategory.getCategoryName())){
|
||||
bizCategory.setParentCode(null);
|
||||
}
|
||||
if (StringUtils.isNotBlank(bizCategory.getRemarks())){
|
||||
if (StringUtils.isNotBlank(bizCategory.getViewCode())
|
||||
|| StringUtils.isNotBlank(bizCategory.getViewCode_like())
|
||||
|| StringUtils.isNotBlank(bizCategory.getCategoryName())
|
||||
|| StringUtils.isNotBlank(bizCategory.getRemarks())){
|
||||
bizCategory.setParentCode(null);
|
||||
}
|
||||
List<BizCategory> list = bizCategoryService.findList(bizCategory);
|
||||
|
||||
@@ -59,6 +59,14 @@ public class Area extends TreeEntity<Area> {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAreaCode_like() {
|
||||
return sqlMap().getWhere().getValue("area_code", QueryType.LIKE);
|
||||
}
|
||||
|
||||
public void setAreaCode_like(String areaCode) {
|
||||
sqlMap().getWhere().and("area_code", QueryType.LIKE, areaCode);
|
||||
}
|
||||
|
||||
@NotBlank(message="名称不能为空")
|
||||
@Size(min=0, max=100, message="名称长度不能超过 100 个字符")
|
||||
public String getAreaName() {
|
||||
|
||||
@@ -36,9 +36,8 @@ var setting = {view:{selectedMulti:false},data:{key:{title:"title"},simpleData:{
|
||||
async:{enable:true,autoParam:["id=parentCode"],url:"${ctx}/biz/bizCategory/treeData"},
|
||||
callback:{onClick:function(event, treeId, treeNode){
|
||||
tree.expandNode(treeNode);
|
||||
win.$('button[type=reset]').click();
|
||||
//win.$('button[type=reset]').click();
|
||||
win.$('#categoryCode').val(treeNode.id);
|
||||
win.$('#categoryName').val(treeNode.name);
|
||||
win.page();
|
||||
}}
|
||||
}, tree, loadTree = function(){
|
||||
|
||||
@@ -23,25 +23,25 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('分类代码')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="viewCode" maxlength="64" class="form-control width-120"/>
|
||||
<#form:input path="viewCode_like" maxlength="64" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('分类名称')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="categoryName" maxlength="64" class="form-control width-120"/>
|
||||
<#form:input path="categoryName" maxlength="64" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('状态')}:</label>
|
||||
<div class="control-inline width-120">
|
||||
<div class="control-inline width-90">
|
||||
<#form:select path="status" dictType="sys_search_status" blankOption="true" class="form-control isQuick"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('备注信息')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="remarks" maxlength="500" class="form-control width-120"/>
|
||||
<#form:input path="remarks" maxlength="500" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -19,16 +19,17 @@
|
||||
<div class="box-body">
|
||||
<#form:form id="searchForm" model="${area}" action="${ctx}/sys/area/listPageData" method="post" class="form-inline "
|
||||
data-page-no="${parameter.pageNo}" data-page-size="${parameter.pageSize}" data-order-by="${parameter.orderBy}">
|
||||
<#form:hidden path="areaCode"/>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('区域代码')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="areaCode" maxlength="100" class="form-control"/>
|
||||
<#form:input path="areaCode_like" maxlength="100" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('区域名称')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="areaName" maxlength="100" class="form-control"/>
|
||||
<#form:input path="areaName" maxlength="100" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
@@ -22,19 +22,19 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('字典标签')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="dictLabelRaw" maxlength="100" class="form-control"/>
|
||||
<#form:input path="dictLabelRaw" maxlength="100" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('字典键值')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="dictValue" maxlength="500" class="form-control"/>
|
||||
<#form:input path="dictValue" maxlength="500" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group hide">
|
||||
<label class="control-label">${text('字典类型')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="dictType" maxlength="100" class="form-control"/>
|
||||
<#form:input path="dictType" maxlength="100" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -80,7 +80,7 @@ $('#dataGrid').dataGrid({
|
||||
}},
|
||||
{header:'${text("字典键值")}', name:'dictValue', index:'a.dict_value', width:200, align:"left"},
|
||||
{header:'${text("排序号")}', name:'treeSort', width:63, align:"center", fixed:true},
|
||||
{header:'${text("系统内置")}', name:'isSys', index:'a.is_sys', width:80, align:"center", formatter: function(val, obj, row, act){
|
||||
{header:'${text("系统内置")}', name:'isSys', index:'a.is_sys', width:90, align:"center", formatter: function(val, obj, row, act){
|
||||
return js.getDictLabel("#{@DictUtils.getDictListJson('sys_yes_no')}", val, '未知', true);
|
||||
}},
|
||||
{header:'${text("CSS类名")}', name:'cssClass', index:'a.css_class', width:100, align:"left"},
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('字典名称')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="dictName" maxlength="100" class="form-control"/>
|
||||
<#form:input path="dictName" maxlength="100" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label">${text('字典类型')}:</label>
|
||||
<div class="control-inline">
|
||||
<#form:input path="dictType_like" maxlength="100" class="form-control"/>
|
||||
<#form:input path="dictType_like" maxlength="100" class="form-control width-90"/>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
|
||||
Reference in New Issue
Block a user