Commit ba0c07e2 by wuyiping

修改人案筛查功能

parent 2301095b
......@@ -1006,5 +1006,39 @@ final public class CommonFunc {
return getDateByStr(sTmpD) + " " + getTimeByStr(sTmpT);
}
/**
* 函数功能:给单位代码右截0
* @param code:待处理字符串
* @param type: 0 sql 1 solr
* @return:参数值
*/
static final public String getDwLike(String code, int type) {
if(code.equals("150000S10000")){//内蒙森林公安局特殊情况
if(type == 0){
code = "(150000S|150723S|150728S|150782S|150784S|150785S|152202S)";
}else{
code = "(150000S* OR 150723S* OR 150728S* OR 150782S* OR 150784S* OR 150785S* OR 152202S*)";
}
return code;
}
if (code.endsWith("0000000000")) {//省
code = code.substring(0, 2);
}else if (code.endsWith("00000000")) {//市
code = code.substring(0, 4);
}else if (code.endsWith("000000")) {//县
code = code.substring(0, 6);
}else if (code.endsWith("0000")) {//科所队
code = code.substring(0, 8);
}else if (code.endsWith("00")) {//科所中队
code = code.substring(0, 10);
} else {
code = code;
}
return code;
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -87,7 +87,7 @@ jQuery.fn.pagination1 = function(maxentries, opts){
}
//产生描述
panel.append("<span>共有 " + maxentries + " 条记录,当前第 <b>" + (current_page + 1) + "</b>/" + np + " 页</span>");
if(maxentries && maxentries > 0){
// 产生"Previous"-链接
if(opts.prev_text && (current_page > 0 || opts.prev_show_always)){
appendItem(current_page-1,{text:opts.prev_text, classes:"prev"});
......@@ -125,11 +125,12 @@ jQuery.fn.pagination1 = function(maxentries, opts){
appendItem(current_page+1,{text:opts.next_text, classes:"next"});
}
}
}
//从选项中提取current_page
var current_page = opts.current_page;
//创建一个显示条数和每页显示条数值
maxentries = (!maxentries || maxentries < 0)?1:maxentries;
maxentries = (!maxentries || maxentries < 0)?0:maxentries;
opts.items_per_page = (!opts.items_per_page || opts.items_per_page < 0)?1:opts.items_per_page;
//存储DOM元素,以方便从所有的内部结构中获取
var panel = jQuery(this);
......
......@@ -39,7 +39,11 @@ input[showtype="date"]{
font-size: 12px;
padding-left: 0px;
}
input[showtype="range"]{
input[name$="PresentType"]:checked{
-webkit-appearance: none;
vertical-align: middle;
background: url(../images/grid-checked-icon.png) no-repeat;
}
input[showtype="grid"]{
......
......@@ -22,7 +22,6 @@ var navCategory = {
searchTermMap = {},
navFields = [],
groupFields = [],
appMap = navCategory.appMap,
navCategoryTermMap;
navCategory.searchType = searchType;
for(var i=0;i<formsLen;i++){
......@@ -120,13 +119,27 @@ var navCategory = {
doSearch: function(groupid){
var searchTerm = navCategory.navCategoryTermMap.searchTerm;
searchTerm.unitcode=$("#unitcode").val();
var sorttype = navCategory.sorttype;
var sortorder = navCategory.sortorder;
if(sorttype){
searchTerm.sorttype=sorttype;
}
if(sortorder){
searchTerm.sortorder=sortorder;
}
if(!groupid){
searchTerm.groupids = navCategory.navCategoryTermMap.navFields.join(',');
}
var searchType = navCategory.searchType;
if(searchType=='aj'){
var presentType = $('input[type=radio][name="asjPresentType"]:checked ').val();
if(presentType=='DList'){
$("#dListContainer").show();
$("#dGridContainer").hide();
LoadData(0,groupid);
}else{
$("#dListContainer").hide();
$("#dGridContainer").show();
var url = "listTbStAsj";
var table_title = [
{title:"操作",field:"cz",align:'center',width:50,checkbox: true},
......@@ -164,6 +177,80 @@ var navCategory = {
$.each(data.groupLists,function(i,item){
if (item.groupList && item.groupList.length>0) {
var groupid = item.groupid;
var text = "";
if(groupid=='JGMC'){
text = "籍贯分类";
}else{
text =$("[type='checkbox'][id$='"+groupid+"']").parent().find("label").text();
}
text=text.substring(0,text.length-2);
str+="<div class=\"newNav\">";
str+="<div class=\"newNavTop\">"+text+"分类</div>";
str+="<div class=\"newNavbody\">";
str+="<div class=\"newLayoutDiv pull-clear\" id=\"XYR_ZHFZXYR_XBDMlayoutDiv\">";
str+="<a onclick=\"\" href=\"javascript:void(0)\" class=\"newNavA pull-left\">"+text+"导航</a>";
str+="<a onclick=\"\" href=\"javascript:void(0)\" class=\"newNavA newNavBtn newMore newNavTools pull-right\">更多</a>";
str+="<a href=\"javascript:void(0)\" id=\"XYR_ZHFZXYR_XBDM\" onclick=\"\" class=\"newNavA newNavBtn newMultival_1 newNavTools pull-right\" title=\"图表筛选\"> 图表</a>";
str+="<div class=\"fillColorCheckBox pull-right\"></div></div>";
str+="<div class=\"newNavInfo\" isshowed=\"false\"><div class=\"newClear\"></div>";
$.each(item.groupList,function(i,item){
str+="<a class=\"newNavA\" style=\"text-decoration:none;\" href=\"javascript:void(0)\" onclick=\"navCategory.searchForm('"+navCategory.searchType+"','"+groupid+"','"+item.groupValue+"')\">"+item.groupValue+"("+item.groupNum+")</a>";
});
str+=" </div> </div> </div>";
}
});
$("#groupList").html(str);
}
}
return data;
}
});
}
}else if(searchType=='ry'){
var presentType = $('input[type=radio][name="ryPresentType"]:checked ').val();
if(presentType=='DList'){
$("#dListContainer").show();
$("#dGridContainer").hide();
LoadData(0,groupid);
}else{
$("#dListContainer").hide();
$("#dGridContainer").show();
var url = "listTbStRy";
var table_title = [
{title:"操作",field:"cz",align:'center',width:50,checkbox: true},
{title:"人员编号",field:"rybh",align:'left',width:300},
{title:"姓名",field:"xm",align:'left',width:150},
{title:"证件号码",field:"zjhm",align:'left',width:150},
{title:"性别",field:"xbdm",align:'left',width:140},
{title:"户籍地地址",field:"hjdzXzqhdm",align:'left',width:140},
{title:"现住地地址",field:"xzzXzqhdm",align:'left',width:150},
{title:"登记时间",field:"djsj",align:'left',width:150},
{title:"违法犯罪经历",field:"wffzjlms",align:'left',width:350}
];
$('#Table').datagrid({
url: url,
columns: [table_title],
striped: true,
queryParams: searchTerm,
singleSelect: true,
nowrap: false, //设置是否换行,false换行,true不换行
fitColumns: true,
scrollbarSize: 0,
selectOnCheck: false,
checkOnSelect: false,
fit: false,
pagination: true,
pageSize: 10,
pageList: [10, 20], //rows
pageNumber: 1,
loadFilter: function (data) {
if(!groupid){
if (data.groupLists && data.groupLists.length>0) {
$("#groupList").empty();
var str="";
$.each(data.groupLists,function(i,item){
if (item.groupList && item.groupList.length>0) {
var groupid = item.groupid;
var text =$("[type='checkbox'][id$='"+groupid+"']").parent().find("label").text();
text=text.substring(0,text.length-2);
str+="<div class=\"newNav\">";
......@@ -188,6 +275,7 @@ var navCategory = {
}
});
}
}
},
myListLoadError: function(mess){
utils.hideLoadMask();
......@@ -522,24 +610,9 @@ var navCategory = {
var sorttype = obj.getAttribute("sorttype"),
order = obj.getAttribute("order");
$(obj).siblings(".resultTabActive").removeClass("resultTabActive");
$(obj).addClass("resultTabActive"),
gridConfig = navCategory.gridConfig;
if(gridConfig){
var queryParams = gridConfig.queryParams;
if(sorttype && order){
queryParams.sort = sorttype;
queryParams.order = order;
if(order === 'DESC'){
obj.setAttribute("order","ASC");
}else if(order === 'ASC'){
obj.setAttribute("order","DESC");
}
}else{
delete queryParams.sort;
delete queryParams.order;
}
appUtils.initResultGrid(gridConfig);
}
$(obj).addClass("resultTabActive");
navCategory.sorttype=sorttype;
navCategory.sortorder=order;
},
myGridLoaded: function(resultMap, config){
var doc = document,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment