列表新增筛选条件。

This commit is contained in:
Renpc-kilig 2022-02-10 15:07:20 +08:00
parent 100df154b5
commit 42bf496c29
18 changed files with 149 additions and 9 deletions

View File

@ -151,21 +151,12 @@ public class SchoolKey {
if(school_name != null && school_name.length() > 255 ) { if(school_name != null && school_name.length() > 255 ) {
throw new ParamsException("学校名称超出长度"); throw new ParamsException("学校名称超出长度");
} }
if(StringUtils.isEmpty(full_name)) {
throw new ParamsException("姓名名不能为空");
}
if(full_name != null && full_name.length() > 20 ) { if(full_name != null && full_name.length() > 20 ) {
throw new ParamsException("姓名超出长度"); throw new ParamsException("姓名超出长度");
} }
if(StringUtils.isEmpty(name_used_before)) {
throw new ParamsException("曾用名名不能为空");
}
if(name_used_before != null && name_used_before.length() > 20 ) { if(name_used_before != null && name_used_before.length() > 20 ) {
throw new ParamsException("曾用名超出长度"); throw new ParamsException("曾用名超出长度");
} }
if(StringUtils.isEmpty(gender)) {
throw new ParamsException("性别名不能为空");
}
if(gender != null && gender.length() > 10 ) { if(gender != null && gender.length() > 10 ) {
throw new ParamsException("性别超出长度"); throw new ParamsException("性别超出长度");
} }

View File

@ -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.pojo.vos.keyareacheckrenovation.KeyAreaCheckRenovationVO;
import cn.com.tenlion.systembase.service.enterprise.IEnterpriseService; import cn.com.tenlion.systembase.service.enterprise.IEnterpriseService;
import cn.com.tenlion.systembase.service.grid.IGridService; import cn.com.tenlion.systembase.service.grid.IGridService;
import cn.com.tenlion.systembase.util.VerifyUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
@ -175,6 +176,18 @@ public class EnterpriseServiceImpl extends DefaultBaseService implements IEnterp
@Override @Override
public List<EnterpriseDTO> list(Map<String, Object> params) { 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); return enterpriseDao.list(params);
} }

View File

@ -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.pojo.vos.homicide.HomicideVO;
import cn.com.tenlion.systembase.service.grid.IGridService; import cn.com.tenlion.systembase.service.grid.IGridService;
import cn.com.tenlion.systembase.service.homicide.IHomicideService; import cn.com.tenlion.systembase.service.homicide.IHomicideService;
import cn.com.tenlion.systembase.util.VerifyUtil;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.pojo.result.SuccessResultList;
@ -151,6 +152,18 @@ public class HomicideServiceImpl extends DefaultBaseService implements IHomicide
@Override @Override
public List<HomicideDTO> list(Map<String, Object> params) { 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); return homicideDao.list(params);
} }

View File

@ -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.bigdta.CgImportantEvent;
import cn.com.tenlion.systembase.pojo.dtos.grid.GridDTO; import cn.com.tenlion.systembase.pojo.dtos.grid.GridDTO;
import cn.com.tenlion.systembase.service.grid.IGridService; import cn.com.tenlion.systembase.service.grid.IGridService;
import cn.com.tenlion.systembase.util.VerifyUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
@ -162,6 +163,18 @@ public class ImportantEventServiceImpl extends DefaultBaseService implements IIm
@Override @Override
public List<ImportantEventDTO> list(Map<String, Object> params) { 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); return importantEventDao.list(params);
} }

View File

@ -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.pojo.vos.keyareacheckrenovation.KeyAreaCheckRenovationVO;
import cn.com.tenlion.systembase.service.grid.IGridService; import cn.com.tenlion.systembase.service.grid.IGridService;
import cn.com.tenlion.systembase.service.keyareacheckrenovation.IKeyAreaCheckRenovationService; import cn.com.tenlion.systembase.service.keyareacheckrenovation.IKeyAreaCheckRenovationService;
import cn.com.tenlion.systembase.util.VerifyUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
@ -164,6 +165,18 @@ public class KeyAreaCheckRenovationServiceImpl extends DefaultBaseService implem
@Override @Override
public List<KeyAreaCheckRenovationDTO> list(Map<String, Object> params) { 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); return keyAreaCheckRenovationDao.list(params);
} }

View File

@ -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.pojo.vos.keyplace.KeyPlaceVO;
import cn.com.tenlion.systembase.service.grid.IGridService; import cn.com.tenlion.systembase.service.grid.IGridService;
import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService; import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService;
import cn.com.tenlion.systembase.util.VerifyUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
@ -162,6 +163,18 @@ public class KeyPlaceServiceImpl extends DefaultBaseService implements IKeyPlace
@Override @Override
public List<KeyPlaceDTO> list(Map<String, Object> params) { 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); return keyPlaceDao.list(params);
} }

View File

@ -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.pojo.vos.linecase.LineCaseVO;
import cn.com.tenlion.systembase.service.grid.IGridService; import cn.com.tenlion.systembase.service.grid.IGridService;
import cn.com.tenlion.systembase.service.linecase.ILineCaseService; import cn.com.tenlion.systembase.service.linecase.ILineCaseService;
import cn.com.tenlion.systembase.util.VerifyUtil;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.pojo.result.SuccessResultList;
@ -151,6 +152,18 @@ public class LineCaseServiceImpl extends DefaultBaseService implements ILineCase
@Override @Override
public List<LineCaseDTO> list(Map<String, Object> params) { 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); return lineCaseDao.list(params);
} }

View File

@ -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.pojo.vos.logisticssafe.LogisticsSafeVO;
import cn.com.tenlion.systembase.service.grid.IGridService; import cn.com.tenlion.systembase.service.grid.IGridService;
import cn.com.tenlion.systembase.service.logisticssafe.ILogisticsSafeService; import cn.com.tenlion.systembase.service.logisticssafe.ILogisticsSafeService;
import cn.com.tenlion.systembase.util.VerifyUtil;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.pojo.result.SuccessResultList;
@ -169,6 +170,18 @@ public class LogisticsSafeServiceImpl extends DefaultBaseService implements ILog
@Override @Override
public List<LogisticsSafeDTO> list(Map<String, Object> params) { 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); return logisticsSafeDao.list(params);
} }

View File

@ -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.pojo.vos.publicvideo.PublicVideoVO;
import cn.com.tenlion.systembase.service.grid.IGridService; import cn.com.tenlion.systembase.service.grid.IGridService;
import cn.com.tenlion.systembase.service.publicvideo.IPublicVideoService; import cn.com.tenlion.systembase.service.publicvideo.IPublicVideoService;
import cn.com.tenlion.systembase.util.VerifyUtil;
import ink.wgink.common.base.DefaultBaseService; import ink.wgink.common.base.DefaultBaseService;
import ink.wgink.pojo.ListPage; import ink.wgink.pojo.ListPage;
import ink.wgink.pojo.result.SuccessResultList; import ink.wgink.pojo.result.SuccessResultList;
@ -151,6 +152,18 @@ public class PublicVideoServiceImpl extends DefaultBaseService implements IPubli
@Override @Override
public List<PublicVideoDTO> list(Map<String, Object> params) { 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); return publicVideoDao.list(params);
} }

View File

@ -17,4 +17,25 @@ public class VerifyUtil {
return false; 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;
}
} }

View File

@ -816,6 +816,9 @@
AND AND
t1.area_code = #{areaCode} t1.area_code = #{areaCode}
</if> </if>
<if test="areaCodeLike != null and areaCodeLike != ''">
AND t1.area_code LIKE CONCAT(#{areaCodeLike}, '%')
</if>
<if test="gridCode != null and gridCode != ''"> <if test="gridCode != null and gridCode != ''">
AND AND
t1.grid_code = #{gridCode} t1.grid_code = #{gridCode}

View File

@ -256,6 +256,9 @@
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
AND t1.happen_location_code = #{areaCode} AND t1.happen_location_code = #{areaCode}
</if> </if>
<if test="areaCodeLike != null and areaCodeLike != ''">
AND t1.happen_location_code LIKE CONCAT(#{areaCodeLike}, '%')
</if>
<if test="grid != null and grid != ''"> <if test="grid != null and grid != ''">
AND t1.grid = #{grid} AND t1.grid = #{grid}
</if> </if>

View File

@ -295,6 +295,9 @@
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
AND t1.location_code = #{areaCode} AND t1.location_code = #{areaCode}
</if> </if>
<if test="areaCodeLike != null and areaCodeLike != ''">
AND t1.location_code LIKE CONCAT(#{areaCodeLike}, '%')
</if>
<if test="grid != null and grid != ''"> <if test="grid != null and grid != ''">
AND t1.grid = #{grid} AND t1.grid = #{grid}
</if> </if>

View File

@ -402,6 +402,9 @@
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
AND t1.location_code = #{areaCode} AND t1.location_code = #{areaCode}
</if> </if>
<if test="areaCodeLike != null and areaCodeLike != ''">
AND t1.location_code LIKE CONCAT(#{areaCodeLike}, '%')
</if>
<if test="grid != null and grid != ''"> <if test="grid != null and grid != ''">
AND t1.grid = #{grid} AND t1.grid = #{grid}
</if> </if>

View File

@ -348,6 +348,9 @@
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
AND t1.area_code = #{areaCode} AND t1.area_code = #{areaCode}
</if> </if>
<if test="areaCodeLike != null and areaCodeLike != ''">
AND t1.area_code LIKE CONCAT(#{areaCodeLike}, '%')
</if>
<if test="grid != null and grid != ''"> <if test="grid != null and grid != ''">
AND t1.grid = #{grid} AND t1.grid = #{grid}
</if> </if>

View File

@ -383,6 +383,9 @@
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
AND t1.location_code = #{areaCode} AND t1.location_code = #{areaCode}
</if> </if>
<if test="areaCodeLike != null and areaCodeLike != ''">
AND t1.location_code LIKE CONCAT(#{areaCodeLike}, '%')
</if>
<if test="grid != null and grid != ''"> <if test="grid != null and grid != ''">
AND t1.grid = #{grid} AND t1.grid = #{grid}
</if> </if>

View File

@ -501,6 +501,9 @@
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
AND t1.enterprise_location_code = #{areaCode} AND t1.enterprise_location_code = #{areaCode}
</if> </if>
<if test="areaCodeLike != null and areaCodeLike != ''">
AND t1.enterprise_location_code LIKE CONCAT(#{areaCodeLike}, '%')
</if>
<if test="grid != null and grid != ''"> <if test="grid != null and grid != ''">
AND t1.grid = #{grid} AND t1.grid = #{grid}
</if> </if>

View File

@ -274,6 +274,9 @@
<if test="areaCode != null and areaCode != ''"> <if test="areaCode != null and areaCode != ''">
AND t1.location_code = #{areaCode} AND t1.location_code = #{areaCode}
</if> </if>
<if test="areaCodeLike != null and areaCodeLike != ''">
AND t1.location_code LIKE CONCAT(#{areaCodeLike}, '%')
</if>
<if test="grid != null and grid != ''"> <if test="grid != null and grid != ''">
AND t1.grid = #{grid} AND t1.grid = #{grid}
</if> </if>