列表新增筛选条件。
This commit is contained in:
parent
100df154b5
commit
42bf496c29
@ -151,21 +151,12 @@ public class SchoolKey {
|
||||
if(school_name != null && school_name.length() > 255 ) {
|
||||
throw new ParamsException("学校名称超出长度");
|
||||
}
|
||||
if(StringUtils.isEmpty(full_name)) {
|
||||
throw new ParamsException("姓名名不能为空");
|
||||
}
|
||||
if(full_name != null && full_name.length() > 20 ) {
|
||||
throw new ParamsException("姓名超出长度");
|
||||
}
|
||||
if(StringUtils.isEmpty(name_used_before)) {
|
||||
throw new ParamsException("曾用名名不能为空");
|
||||
}
|
||||
if(name_used_before != null && name_used_before.length() > 20 ) {
|
||||
throw new ParamsException("曾用名超出长度");
|
||||
}
|
||||
if(StringUtils.isEmpty(gender)) {
|
||||
throw new ParamsException("性别名不能为空");
|
||||
}
|
||||
if(gender != null && gender.length() > 10 ) {
|
||||
throw new ParamsException("性别超出长度");
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ import cn.com.tenlion.systembase.pojo.vos.enterprise.EnterpriseVO;
|
||||
import cn.com.tenlion.systembase.pojo.vos.keyareacheckrenovation.KeyAreaCheckRenovationVO;
|
||||
import cn.com.tenlion.systembase.service.enterprise.IEnterpriseService;
|
||||
import cn.com.tenlion.systembase.service.grid.IGridService;
|
||||
import cn.com.tenlion.systembase.util.VerifyUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
@ -175,6 +176,18 @@ public class EnterpriseServiceImpl extends DefaultBaseService implements IEnterp
|
||||
|
||||
@Override
|
||||
public List<EnterpriseDTO> list(Map<String, Object> params) {
|
||||
if(params.get("areaCodeLike") != null && !"".equals(params.get("areaCodeLike").toString())){
|
||||
String areaCoed = params.get("areaCodeLike").toString();
|
||||
String[] areaCodeSplit = VerifyUtil.splitStringByLength(areaCoed, 2);
|
||||
String areaCodeLike = "";
|
||||
for(int i = 5 ; i >= 0; i--){
|
||||
if(!"00".equals(areaCodeSplit[i])){
|
||||
areaCodeLike = areaCoed.substring(0, (i + 1) * 2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
params.put("areaCodeLike",areaCodeLike);
|
||||
}
|
||||
return enterpriseDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import cn.com.tenlion.systembase.pojo.pos.homicide.HomicidePO;
|
||||
import cn.com.tenlion.systembase.pojo.vos.homicide.HomicideVO;
|
||||
import cn.com.tenlion.systembase.service.grid.IGridService;
|
||||
import cn.com.tenlion.systembase.service.homicide.IHomicideService;
|
||||
import cn.com.tenlion.systembase.util.VerifyUtil;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
@ -151,6 +152,18 @@ public class HomicideServiceImpl extends DefaultBaseService implements IHomicide
|
||||
|
||||
@Override
|
||||
public List<HomicideDTO> list(Map<String, Object> params) {
|
||||
if(params.get("areaCodeLike") != null && !"".equals(params.get("areaCodeLike").toString())){
|
||||
String areaCoed = params.get("areaCodeLike").toString();
|
||||
String[] areaCodeSplit = VerifyUtil.splitStringByLength(areaCoed, 2);
|
||||
String areaCodeLike = "";
|
||||
for(int i = 5 ; i >= 0; i--){
|
||||
if(!"00".equals(areaCodeSplit[i])){
|
||||
areaCodeLike = areaCoed.substring(0, (i + 1) * 2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
params.put("areaCodeLike",areaCodeLike);
|
||||
}
|
||||
return homicideDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@ package cn.com.tenlion.systembase.service.importantevent.impl;
|
||||
import cn.com.tenlion.systembase.pojo.dtos.bigdta.CgImportantEvent;
|
||||
import cn.com.tenlion.systembase.pojo.dtos.grid.GridDTO;
|
||||
import cn.com.tenlion.systembase.service.grid.IGridService;
|
||||
import cn.com.tenlion.systembase.util.VerifyUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
@ -162,6 +163,18 @@ public class ImportantEventServiceImpl extends DefaultBaseService implements IIm
|
||||
|
||||
@Override
|
||||
public List<ImportantEventDTO> list(Map<String, Object> params) {
|
||||
if(params.get("areaCodeLike") != null && !"".equals(params.get("areaCodeLike").toString())){
|
||||
String areaCoed = params.get("areaCodeLike").toString();
|
||||
String[] areaCodeSplit = VerifyUtil.splitStringByLength(areaCoed, 2);
|
||||
String areaCodeLike = "";
|
||||
for(int i = 5 ; i >= 0; i--){
|
||||
if(!"00".equals(areaCodeSplit[i])){
|
||||
areaCodeLike = areaCoed.substring(0, (i + 1) * 2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
params.put("areaCodeLike",areaCodeLike);
|
||||
}
|
||||
return importantEventDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -11,6 +11,7 @@ import cn.com.tenlion.systembase.pojo.vos.comprehensivecenter.ComprehensiveCente
|
||||
import cn.com.tenlion.systembase.pojo.vos.keyareacheckrenovation.KeyAreaCheckRenovationVO;
|
||||
import cn.com.tenlion.systembase.service.grid.IGridService;
|
||||
import cn.com.tenlion.systembase.service.keyareacheckrenovation.IKeyAreaCheckRenovationService;
|
||||
import cn.com.tenlion.systembase.util.VerifyUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
@ -164,6 +165,18 @@ public class KeyAreaCheckRenovationServiceImpl extends DefaultBaseService implem
|
||||
|
||||
@Override
|
||||
public List<KeyAreaCheckRenovationDTO> list(Map<String, Object> params) {
|
||||
if(params.get("areaCodeLike") != null && !"".equals(params.get("areaCodeLike").toString())){
|
||||
String areaCoed = params.get("areaCodeLike").toString();
|
||||
String[] areaCodeSplit = VerifyUtil.splitStringByLength(areaCoed, 2);
|
||||
String areaCodeLike = "";
|
||||
for(int i = 5 ; i >= 0; i--){
|
||||
if(!"00".equals(areaCodeSplit[i])){
|
||||
areaCodeLike = areaCoed.substring(0, (i + 1) * 2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
params.put("areaCodeLike",areaCodeLike);
|
||||
}
|
||||
return keyAreaCheckRenovationDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -9,6 +9,7 @@ import cn.com.tenlion.systembase.pojo.pos.keyplace.KeyPlacePO;
|
||||
import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO;
|
||||
import cn.com.tenlion.systembase.service.grid.IGridService;
|
||||
import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService;
|
||||
import cn.com.tenlion.systembase.util.VerifyUtil;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
@ -162,6 +163,18 @@ public class KeyPlaceServiceImpl extends DefaultBaseService implements IKeyPlace
|
||||
|
||||
@Override
|
||||
public List<KeyPlaceDTO> list(Map<String, Object> params) {
|
||||
if(params.get("areaCodeLike") != null && !"".equals(params.get("areaCodeLike").toString())){
|
||||
String areaCoed = params.get("areaCodeLike").toString();
|
||||
String[] areaCodeSplit = VerifyUtil.splitStringByLength(areaCoed, 2);
|
||||
String areaCodeLike = "";
|
||||
for(int i = 5 ; i >= 0; i--){
|
||||
if(!"00".equals(areaCodeSplit[i])){
|
||||
areaCodeLike = areaCoed.substring(0, (i + 1) * 2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
params.put("areaCodeLike",areaCodeLike);
|
||||
}
|
||||
return keyPlaceDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import cn.com.tenlion.systembase.pojo.pos.linecase.LineCasePO;
|
||||
import cn.com.tenlion.systembase.pojo.vos.linecase.LineCaseVO;
|
||||
import cn.com.tenlion.systembase.service.grid.IGridService;
|
||||
import cn.com.tenlion.systembase.service.linecase.ILineCaseService;
|
||||
import cn.com.tenlion.systembase.util.VerifyUtil;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
@ -151,6 +152,18 @@ public class LineCaseServiceImpl extends DefaultBaseService implements ILineCase
|
||||
|
||||
@Override
|
||||
public List<LineCaseDTO> list(Map<String, Object> params) {
|
||||
if(params.get("areaCodeLike") != null && !"".equals(params.get("areaCodeLike").toString())){
|
||||
String areaCoed = params.get("areaCodeLike").toString();
|
||||
String[] areaCodeSplit = VerifyUtil.splitStringByLength(areaCoed, 2);
|
||||
String areaCodeLike = "";
|
||||
for(int i = 5 ; i >= 0; i--){
|
||||
if(!"00".equals(areaCodeSplit[i])){
|
||||
areaCodeLike = areaCoed.substring(0, (i + 1) * 2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
params.put("areaCodeLike",areaCodeLike);
|
||||
}
|
||||
return lineCaseDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import cn.com.tenlion.systembase.pojo.pos.logisticssafe.LogisticsSafePO;
|
||||
import cn.com.tenlion.systembase.pojo.vos.logisticssafe.LogisticsSafeVO;
|
||||
import cn.com.tenlion.systembase.service.grid.IGridService;
|
||||
import cn.com.tenlion.systembase.service.logisticssafe.ILogisticsSafeService;
|
||||
import cn.com.tenlion.systembase.util.VerifyUtil;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
@ -169,6 +170,18 @@ public class LogisticsSafeServiceImpl extends DefaultBaseService implements ILog
|
||||
|
||||
@Override
|
||||
public List<LogisticsSafeDTO> list(Map<String, Object> params) {
|
||||
if(params.get("areaCodeLike") != null && !"".equals(params.get("areaCodeLike").toString())){
|
||||
String areaCoed = params.get("areaCodeLike").toString();
|
||||
String[] areaCodeSplit = VerifyUtil.splitStringByLength(areaCoed, 2);
|
||||
String areaCodeLike = "";
|
||||
for(int i = 5 ; i >= 0; i--){
|
||||
if(!"00".equals(areaCodeSplit[i])){
|
||||
areaCodeLike = areaCoed.substring(0, (i + 1) * 2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
params.put("areaCodeLike",areaCodeLike);
|
||||
}
|
||||
return logisticsSafeDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ import cn.com.tenlion.systembase.pojo.pos.publicvideo.PublicVideoPO;
|
||||
import cn.com.tenlion.systembase.pojo.vos.publicvideo.PublicVideoVO;
|
||||
import cn.com.tenlion.systembase.service.grid.IGridService;
|
||||
import cn.com.tenlion.systembase.service.publicvideo.IPublicVideoService;
|
||||
import cn.com.tenlion.systembase.util.VerifyUtil;
|
||||
import ink.wgink.common.base.DefaultBaseService;
|
||||
import ink.wgink.pojo.ListPage;
|
||||
import ink.wgink.pojo.result.SuccessResultList;
|
||||
@ -151,6 +152,18 @@ public class PublicVideoServiceImpl extends DefaultBaseService implements IPubli
|
||||
|
||||
@Override
|
||||
public List<PublicVideoDTO> list(Map<String, Object> params) {
|
||||
if(params.get("areaCodeLike") != null && !"".equals(params.get("areaCodeLike").toString())){
|
||||
String areaCoed = params.get("areaCodeLike").toString();
|
||||
String[] areaCodeSplit = VerifyUtil.splitStringByLength(areaCoed, 2);
|
||||
String areaCodeLike = "";
|
||||
for(int i = 5 ; i >= 0; i--){
|
||||
if(!"00".equals(areaCodeSplit[i])){
|
||||
areaCodeLike = areaCoed.substring(0, (i + 1) * 2 );
|
||||
break;
|
||||
}
|
||||
}
|
||||
params.put("areaCodeLike",areaCodeLike);
|
||||
}
|
||||
return publicVideoDao.list(params);
|
||||
}
|
||||
|
||||
|
@ -17,4 +17,25 @@ public class VerifyUtil {
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static String[] splitStringByLength(String src, int length) {
|
||||
//检查参数是否合法
|
||||
if (null == src || src.equals("")) {
|
||||
return null;
|
||||
}
|
||||
if (length <= 0) {
|
||||
return null;
|
||||
}
|
||||
//获取整个字符串可以被切割成字符子串的个数
|
||||
int n = (src.length() + length - 1) / length;
|
||||
String[] split = new String[n];
|
||||
for (int i = 0; i < n; i++) {
|
||||
if (i < (n -1)) {
|
||||
split[i] = src.substring(i * length, (i + 1) * length);
|
||||
} else {
|
||||
split[i] = src.substring(i * length);
|
||||
}
|
||||
}
|
||||
return split;
|
||||
}
|
||||
}
|
||||
|
@ -816,6 +816,9 @@
|
||||
AND
|
||||
t1.area_code = #{areaCode}
|
||||
</if>
|
||||
<if test="areaCodeLike != null and areaCodeLike != ''">
|
||||
AND t1.area_code LIKE CONCAT(#{areaCodeLike}, '%')
|
||||
</if>
|
||||
<if test="gridCode != null and gridCode != ''">
|
||||
AND
|
||||
t1.grid_code = #{gridCode}
|
||||
|
@ -256,6 +256,9 @@
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t1.happen_location_code = #{areaCode}
|
||||
</if>
|
||||
<if test="areaCodeLike != null and areaCodeLike != ''">
|
||||
AND t1.happen_location_code LIKE CONCAT(#{areaCodeLike}, '%')
|
||||
</if>
|
||||
<if test="grid != null and grid != ''">
|
||||
AND t1.grid = #{grid}
|
||||
</if>
|
||||
|
@ -295,6 +295,9 @@
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t1.location_code = #{areaCode}
|
||||
</if>
|
||||
<if test="areaCodeLike != null and areaCodeLike != ''">
|
||||
AND t1.location_code LIKE CONCAT(#{areaCodeLike}, '%')
|
||||
</if>
|
||||
<if test="grid != null and grid != ''">
|
||||
AND t1.grid = #{grid}
|
||||
</if>
|
||||
|
@ -402,6 +402,9 @@
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t1.location_code = #{areaCode}
|
||||
</if>
|
||||
<if test="areaCodeLike != null and areaCodeLike != ''">
|
||||
AND t1.location_code LIKE CONCAT(#{areaCodeLike}, '%')
|
||||
</if>
|
||||
<if test="grid != null and grid != ''">
|
||||
AND t1.grid = #{grid}
|
||||
</if>
|
||||
|
@ -348,6 +348,9 @@
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t1.area_code = #{areaCode}
|
||||
</if>
|
||||
<if test="areaCodeLike != null and areaCodeLike != ''">
|
||||
AND t1.area_code LIKE CONCAT(#{areaCodeLike}, '%')
|
||||
</if>
|
||||
<if test="grid != null and grid != ''">
|
||||
AND t1.grid = #{grid}
|
||||
</if>
|
||||
|
@ -383,6 +383,9 @@
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t1.location_code = #{areaCode}
|
||||
</if>
|
||||
<if test="areaCodeLike != null and areaCodeLike != ''">
|
||||
AND t1.location_code LIKE CONCAT(#{areaCodeLike}, '%')
|
||||
</if>
|
||||
<if test="grid != null and grid != ''">
|
||||
AND t1.grid = #{grid}
|
||||
</if>
|
||||
|
@ -501,6 +501,9 @@
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t1.enterprise_location_code = #{areaCode}
|
||||
</if>
|
||||
<if test="areaCodeLike != null and areaCodeLike != ''">
|
||||
AND t1.enterprise_location_code LIKE CONCAT(#{areaCodeLike}, '%')
|
||||
</if>
|
||||
<if test="grid != null and grid != ''">
|
||||
AND t1.grid = #{grid}
|
||||
</if>
|
||||
|
@ -274,6 +274,9 @@
|
||||
<if test="areaCode != null and areaCode != ''">
|
||||
AND t1.location_code = #{areaCode}
|
||||
</if>
|
||||
<if test="areaCodeLike != null and areaCodeLike != ''">
|
||||
AND t1.location_code LIKE CONCAT(#{areaCodeLike}, '%')
|
||||
</if>
|
||||
<if test="grid != null and grid != ''">
|
||||
AND t1.grid = #{grid}
|
||||
</if>
|
||||
|
Loading…
Reference in New Issue
Block a user