特殊字符限制搜索
This commit is contained in:
parent
64f7aec322
commit
b2fc2c33c6
|
|
@ -146,14 +146,4 @@ public class Constants {
|
||||||
*/
|
*/
|
||||||
public static final String DISALLOWED_REGEX = ".*[!~`@#$%^&*()\\-_,.?\":{}|<>+\\\\/%].*";
|
public static final String DISALLOWED_REGEX = ".*[!~`@#$%^&*()\\-_,.?\":{}|<>+\\\\/%].*";
|
||||||
|
|
||||||
/**
|
|
||||||
* 百分号
|
|
||||||
*/
|
|
||||||
public static final String PERCENT_SIGN = "%";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 下划线
|
|
||||||
*/
|
|
||||||
public static final String UNDERLINE = "_";
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,35 +82,27 @@ public class TbBdDeviceRecordServiceImpl implements TbBdDeviceRecordService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbBdDeviceVo> getDeviceList(TbBdDeviceVo tbBdDeviceVo) {
|
public List<TbBdDeviceVo> getDeviceList(TbBdDeviceVo tbBdDeviceVo) {
|
||||||
if (tbBdDeviceVo.getProName() != null) {
|
if (tbBdDeviceVo.getProName() != null) {
|
||||||
String proName = tbBdDeviceVo.getProName();
|
boolean b = tbBdDeviceVo.getProName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(proName)) {
|
if (b) {
|
||||||
tbBdDeviceVo.setProName(proName.replace("_", "/_"));
|
tbBdDeviceVo.setProName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(proName)) {
|
|
||||||
tbBdDeviceVo.setProName(proName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbBdDeviceVo.getDepartName() != null) {
|
if (tbBdDeviceVo.getDepartName() != null) {
|
||||||
String departName = tbBdDeviceVo.getDepartName();
|
boolean b = tbBdDeviceVo.getDepartName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(departName)) {
|
if (b) {
|
||||||
tbBdDeviceVo.setDepartName(departName.replace("_", "/_"));
|
tbBdDeviceVo.setDepartName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(departName)) {
|
|
||||||
tbBdDeviceVo.setDepartName(departName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbBdDeviceVo.getDevName() != null) {
|
if (tbBdDeviceVo.getDevName() != null) {
|
||||||
String devName = tbBdDeviceVo.getDevName();
|
boolean b = tbBdDeviceVo.getDevName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devName)) {
|
if (b) {
|
||||||
tbBdDeviceVo.setDevName(devName.replace("_", "/_"));
|
tbBdDeviceVo.setDevName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devName)) {
|
|
||||||
tbBdDeviceVo.setDevName(devName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbBdDeviceVo.getDevCode() != null) {
|
if (tbBdDeviceVo.getDevCode() != null) {
|
||||||
String devCode = tbBdDeviceVo.getDevCode();
|
boolean b = tbBdDeviceVo.getDevCode().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devCode)) {
|
if (b) {
|
||||||
tbBdDeviceVo.setDevCode(devCode.replace("_", "/_"));
|
tbBdDeviceVo.setDevCode("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devCode)) {
|
|
||||||
tbBdDeviceVo.setDevCode(devCode.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbBdDeviceVo> deviceList = tbBdDeviceRecordMapper.getDeviceList(tbBdDeviceVo);
|
List<TbBdDeviceVo> deviceList = tbBdDeviceRecordMapper.getDeviceList(tbBdDeviceVo);
|
||||||
|
|
|
||||||
|
|
@ -227,27 +227,21 @@ public class TbBdRecordServiceImpl implements TbBdRecordService {
|
||||||
@Override
|
@Override
|
||||||
public PageResultVo<TbBdRecord> getAll(TbBdRecord record){
|
public PageResultVo<TbBdRecord> getAll(TbBdRecord record){
|
||||||
if (record.getDepartName() != null) {
|
if (record.getDepartName() != null) {
|
||||||
String departName = record.getDepartName();
|
boolean b = record.getDepartName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(departName)) {
|
if (b) {
|
||||||
record.setDepartName(departName.replace("_", "/_"));
|
record.setDepartName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(departName)) {
|
|
||||||
record.setDepartName(departName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (record.getProName() != null) {
|
if (record.getProName() != null) {
|
||||||
String proName = record.getProName();
|
boolean b = record.getProName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(proName)) {
|
if (b) {
|
||||||
record.setProName(proName.replace("_", "/_"));
|
record.setProName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(proName)) {
|
|
||||||
record.setProName(proName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (record.getRelUser() != null) {
|
if (record.getRelUser() != null) {
|
||||||
String relUser = record.getRelUser();
|
boolean b = record.getRelUser().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(relUser)) {
|
if (b) {
|
||||||
record.setRelUser(relUser.replace("_", "/_"));
|
record.setRelUser("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(relUser)) {
|
|
||||||
record.setRelUser(relUser.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbBdRecord> list;
|
List<TbBdRecord> list;
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,10 @@ public class TbDevAttributeServiceImpl implements TbDevAttributeService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public PageResultVo<TbDevAttributeVo> queryAll(TbDevAttribute record) {
|
public PageResultVo<TbDevAttributeVo> queryAll(TbDevAttribute record) {
|
||||||
if (record.getDevName() != null) {
|
if (record.getDevName() != null) {
|
||||||
String devName = record.getDevName();
|
boolean b = record.getDevName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devName)) {
|
if (b) {
|
||||||
record.setDevName(devName.replace("_", "/_"));
|
record.setDevName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devName)) {
|
|
||||||
record.setDevName(devName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbDevAttributeVo> list;
|
List<TbDevAttributeVo> list;
|
||||||
|
|
|
||||||
|
|
@ -134,19 +134,15 @@ public class TbDeviceServiceImpl implements TbDeviceService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbDevice> getAll(TbDevice record) {
|
public List<TbDevice> getAll(TbDevice record) {
|
||||||
if (record.getDevName() != null) {
|
if (record.getDevName() != null) {
|
||||||
String devName = record.getDevName();
|
boolean b = record.getDevName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devName)) {
|
if (b) {
|
||||||
record.setDevName(devName.replace("_", "/_"));
|
record.setDevName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devName)) {
|
|
||||||
record.setDevName(devName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (record.getDevCode() != null) {
|
if (record.getDevCode() != null) {
|
||||||
String devCode = record.getDevCode();
|
boolean b = record.getDevCode().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devCode)) {
|
if (b) {
|
||||||
record.setDevCode(devCode.replace("_", "/_"));
|
record.setDevCode("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devCode)) {
|
|
||||||
record.setDevCode(devCode.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tbDeviceMapper.getAll(record);
|
return tbDeviceMapper.getAll(record);
|
||||||
|
|
|
||||||
|
|
@ -79,11 +79,9 @@ public class TbPeopleServiceImpl implements TbPeopleService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbPeople> queryByPage(TbPeople tbPeople) {
|
public List<TbPeople> queryByPage(TbPeople tbPeople) {
|
||||||
if (tbPeople.getRelName() != null) {
|
if (tbPeople.getRelName() != null) {
|
||||||
String relName = tbPeople.getRelName();
|
boolean b = tbPeople.getRelName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(relName)) {
|
if (b) {
|
||||||
tbPeople.setRelName(relName.replace("_", "/_"));
|
tbPeople.setRelName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(relName)) {
|
|
||||||
tbPeople.setRelName(relName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbPeople> peopleList = tbPeopleDao.queryByPage(tbPeople);
|
List<TbPeople> peopleList = tbPeopleDao.queryByPage(tbPeople);
|
||||||
|
|
|
||||||
|
|
@ -64,19 +64,15 @@ public class TbProDepartServiceImpl implements TbProDepartService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbProDepart> queryByPage(TbProDepart tbProDepart) {
|
public List<TbProDepart> queryByPage(TbProDepart tbProDepart) {
|
||||||
if (tbProDepart.getDepartName() != null) {
|
if (tbProDepart.getDepartName() != null) {
|
||||||
String departName = tbProDepart.getDepartName();
|
boolean b = tbProDepart.getDepartName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(departName)) {
|
if (b) {
|
||||||
tbProDepart.setDepartName(departName.replace("_", "/_"));
|
tbProDepart.setDepartName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(departName)) {
|
|
||||||
tbProDepart.setDepartName(departName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbProDepart.getHeadUser() != null) {
|
if (tbProDepart.getHeadUser() != null) {
|
||||||
String headUser = tbProDepart.getHeadUser();
|
boolean b = tbProDepart.getHeadUser().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(headUser)) {
|
if (b) {
|
||||||
tbProDepart.setHeadUser(headUser.replace("_", "/_"));
|
tbProDepart.setHeadUser("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(headUser)) {
|
|
||||||
tbProDepart.setHeadUser(headUser.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbProDepart> list = tbProDepartDao.queryByPage(tbProDepart);
|
List<TbProDepart> list = tbProDepartDao.queryByPage(tbProDepart);
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,9 @@ public class TbProPowerServiceImpl implements TbProPowerService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbProPower> queryByPage(TbProPower tbProPower) {
|
public List<TbProPower> queryByPage(TbProPower tbProPower) {
|
||||||
if (tbProPower.getGtName() != null) {
|
if (tbProPower.getGtName() != null) {
|
||||||
String gtName = tbProPower.getGtName();
|
boolean b = tbProPower.getGtName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(gtName)) {
|
if (b) {
|
||||||
tbProPower.setGtName(gtName.replace("_", "/_"));
|
tbProPower.setGtName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(gtName)) {
|
|
||||||
tbProPower.setGtName(gtName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tbProPowerDao.queryByPage(tbProPower);
|
return tbProPowerDao.queryByPage(tbProPower);
|
||||||
|
|
|
||||||
|
|
@ -59,19 +59,15 @@ public class TbProjectServiceImpl implements TbProjectService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbProjectVo> queryByPage(TbProject tbProject) {
|
public List<TbProjectVo> queryByPage(TbProject tbProject) {
|
||||||
if (tbProject.getDepartName() != null) {
|
if (tbProject.getDepartName() != null) {
|
||||||
String departName = tbProject.getDepartName();
|
boolean b = tbProject.getDepartName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(departName)) {
|
if (b) {
|
||||||
tbProject.setDepartName(departName.replace("_", "/_"));
|
tbProject.setDepartName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(departName)) {
|
|
||||||
tbProject.setDepartName(departName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbProject.getProName() != null) {
|
if (tbProject.getProName() != null) {
|
||||||
String proName = tbProject.getProName();
|
boolean b = tbProject.getProName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(proName)) {
|
if (b) {
|
||||||
tbProject.setProName(proName.replace("_", "/_"));
|
tbProject.setProName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(proName)) {
|
|
||||||
tbProject.setProName(proName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tbProjectDao.queryByPage(tbProject);
|
return tbProjectDao.queryByPage(tbProject);
|
||||||
|
|
|
||||||
|
|
@ -84,27 +84,21 @@ public class TbTeamServiceImpl implements TbTeamService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbTeam> queryByPage(TbTeam tbTeam) {
|
public List<TbTeam> queryByPage(TbTeam tbTeam) {
|
||||||
if (tbTeam.getTeamName() != null) {
|
if (tbTeam.getTeamName() != null) {
|
||||||
String teamName = tbTeam.getTeamName();
|
boolean b = tbTeam.getTeamName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(teamName)) {
|
if (b) {
|
||||||
tbTeam.setTeamName(teamName.replace("_", "/_"));
|
tbTeam.setTeamName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(teamName)) {
|
|
||||||
tbTeam.setTeamName(teamName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbTeam.getRelName() != null) {
|
if (tbTeam.getRelName() != null) {
|
||||||
String relName = tbTeam.getRelName();
|
boolean b = tbTeam.getRelName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(relName)) {
|
if (b) {
|
||||||
tbTeam.setRelName(relName.replace("_", "/_"));
|
tbTeam.setRelName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(relName)) {
|
|
||||||
tbTeam.setRelName(relName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbTeam.getKeyWord() != null) {
|
if (tbTeam.getKeyWord() != null) {
|
||||||
String keyWord = tbTeam.getKeyWord();
|
boolean b = tbTeam.getKeyWord().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(keyWord)) {
|
if (b) {
|
||||||
tbTeam.setKeyWord(keyWord.replace("_", "/_"));
|
tbTeam.setKeyWord("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(keyWord)) {
|
|
||||||
tbTeam.setKeyWord(keyWord.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbTeam> teamList = tbTeamDao.queryByPage(tbTeam);
|
List<TbTeam> teamList = tbTeamDao.queryByPage(tbTeam);
|
||||||
|
|
|
||||||
|
|
@ -36,19 +36,15 @@ public class TbUserPostServiceImpl implements TbUserPostService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbUserPost> queryByPage(TbUserPost tbUserPost) {
|
public List<TbUserPost> queryByPage(TbUserPost tbUserPost) {
|
||||||
if (tbUserPost.getPostName() != null) {
|
if (tbUserPost.getPostName() != null) {
|
||||||
String postName = tbUserPost.getPostName();
|
boolean b = tbUserPost.getPostName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(postName)) {
|
if (b) {
|
||||||
tbUserPost.setPostName(postName.replace("_", "/_"));
|
tbUserPost.setPostName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(postName)) {
|
|
||||||
tbUserPost.setPostName(postName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbUserPost.getRelName() != null) {
|
if (tbUserPost.getRelName() != null) {
|
||||||
String relName = tbUserPost.getRelName();
|
boolean b = tbUserPost.getRelName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(relName)) {
|
if (b) {
|
||||||
tbUserPost.setRelName(relName.replace("_", "/_"));
|
tbUserPost.setRelName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(relName)) {
|
|
||||||
tbUserPost.setRelName(relName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbUserPost> list = tbUserPostDao.queryByPage(tbUserPost);
|
List<TbUserPost> list = tbUserPostDao.queryByPage(tbUserPost);
|
||||||
|
|
|
||||||
|
|
@ -129,11 +129,9 @@ public class TbWarnConfigServiceImpl implements TbWarnConfigService {
|
||||||
@Override
|
@Override
|
||||||
public List<TbWarnConfig> getAll(TbWarnConfig record){
|
public List<TbWarnConfig> getAll(TbWarnConfig record){
|
||||||
if (record.getConfigName() != null) {
|
if (record.getConfigName() != null) {
|
||||||
String configName = record.getConfigName();
|
boolean b = record.getConfigName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(configName)) {
|
if (b) {
|
||||||
record.setConfigName(configName.replace("_", "/_"));
|
record.setConfigName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(configName)) {
|
|
||||||
record.setConfigName(configName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TbWarnConfig> list = tbWarnConfigMapper.getAll(record);
|
List<TbWarnConfig> list = tbWarnConfigMapper.getAll(record);
|
||||||
|
|
|
||||||
|
|
@ -89,11 +89,9 @@ public class ProjectViewServiceImpl {
|
||||||
|
|
||||||
public List<DeviceWarnRecordVo> getDeviceWarnRecord(DeviceWarnRecordVo deviceWarnRecordVo) {
|
public List<DeviceWarnRecordVo> getDeviceWarnRecord(DeviceWarnRecordVo deviceWarnRecordVo) {
|
||||||
if (deviceWarnRecordVo.getProName() != null) {
|
if (deviceWarnRecordVo.getProName() != null) {
|
||||||
String proName = deviceWarnRecordVo.getProName();
|
boolean b = deviceWarnRecordVo.getProName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(proName)) {
|
if (b) {
|
||||||
deviceWarnRecordVo.setProName(proName.replace("_", "/_"));
|
deviceWarnRecordVo.setProName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(proName)) {
|
|
||||||
deviceWarnRecordVo.setProName(proName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tbDeviceDataRecord.getDeviceWarnRecord(deviceWarnRecordVo);
|
return tbDeviceDataRecord.getDeviceWarnRecord(deviceWarnRecordVo);
|
||||||
|
|
@ -106,11 +104,9 @@ public class ProjectViewServiceImpl {
|
||||||
*/
|
*/
|
||||||
public List<WarnPredictionRecordVo> getWarnPredictionRecord(WarnPredictionRecordVo record) {
|
public List<WarnPredictionRecordVo> getWarnPredictionRecord(WarnPredictionRecordVo record) {
|
||||||
if (record.getProName() != null) {
|
if (record.getProName() != null) {
|
||||||
String proName = record.getProName();
|
boolean b = record.getProName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(proName)) {
|
if (b) {
|
||||||
record.setProName(proName.replace("_", "/_"));
|
record.setProName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(proName)) {
|
|
||||||
record.setProName(proName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tbDeviceDataRecord.getWarnPredictionRecord(record);
|
return tbDeviceDataRecord.getWarnPredictionRecord(record);
|
||||||
|
|
@ -177,19 +173,15 @@ public class ProjectViewServiceImpl {
|
||||||
*/
|
*/
|
||||||
public List<DeviceWarnRecordVo> getDeviceModelDetailsPage(TbDevice tbDevice) {
|
public List<DeviceWarnRecordVo> getDeviceModelDetailsPage(TbDevice tbDevice) {
|
||||||
if (tbDevice.getDevName() != null) {
|
if (tbDevice.getDevName() != null) {
|
||||||
String devName = tbDevice.getDevName();
|
boolean b = tbDevice.getDevName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devName)) {
|
if (b) {
|
||||||
tbDevice.setDevName(devName.replace("_", "/_"));
|
tbDevice.setDevName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devName)) {
|
|
||||||
tbDevice.setDevName(devName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tbDevice.getDevCode() != null) {
|
if (tbDevice.getDevCode() != null) {
|
||||||
String devCode = tbDevice.getDevCode();
|
boolean b = tbDevice.getDevCode().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devCode)) {
|
if (b) {
|
||||||
tbDevice.setDevCode(devCode.replace("_", "/_"));
|
tbDevice.setDevCode("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devCode)) {
|
|
||||||
tbDevice.setDevCode(devCode.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tbDeviceMapper.getDeviceModelDetailsPage(tbDevice);
|
return tbDeviceMapper.getDeviceModelDetailsPage(tbDevice);
|
||||||
|
|
@ -202,19 +194,15 @@ public class ProjectViewServiceImpl {
|
||||||
*/
|
*/
|
||||||
public List<TbBdDeviceRecordTwo> getDeviceModelDataAll(TbBdDeviceRecordTwo bdData) {
|
public List<TbBdDeviceRecordTwo> getDeviceModelDataAll(TbBdDeviceRecordTwo bdData) {
|
||||||
if (bdData.getDevName() != null) {
|
if (bdData.getDevName() != null) {
|
||||||
String devName = bdData.getDevName();
|
boolean b = bdData.getDevName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devName)) {
|
if (b) {
|
||||||
bdData.setDevName(devName.replace("_", "/_"));
|
bdData.setDevName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devName)) {
|
|
||||||
bdData.setDevName(devName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (bdData.getDevCode() != null) {
|
if (bdData.getDevCode() != null) {
|
||||||
String devCode = bdData.getDevCode();
|
boolean b = bdData.getDevCode().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(devCode)) {
|
if (b) {
|
||||||
bdData.setDevCode(devCode.replace("_", "/_"));
|
bdData.setDevCode("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(devCode)) {
|
|
||||||
bdData.setDevCode(devCode.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return tbDeviceMapper.getDeviceModelDataAll(bdData);
|
return tbDeviceMapper.getDeviceModelDataAll(bdData);
|
||||||
|
|
@ -273,19 +261,15 @@ public class ProjectViewServiceImpl {
|
||||||
*/
|
*/
|
||||||
public List<TeamRecord> getTeamDetails(TeamRecord record) {
|
public List<TeamRecord> getTeamDetails(TeamRecord record) {
|
||||||
if (record.getTeamName() != null) {
|
if (record.getTeamName() != null) {
|
||||||
String teamName = record.getTeamName();
|
boolean b = record.getTeamName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(teamName)) {
|
if (b) {
|
||||||
record.setTeamName(teamName.replace("_", "/_"));
|
record.setTeamName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(teamName)) {
|
|
||||||
record.setTeamName(teamName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (record.getMasterName() != null) {
|
if (record.getMasterName() != null) {
|
||||||
String masterName = record.getMasterName();
|
boolean b = record.getMasterName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(masterName)) {
|
if (b) {
|
||||||
record.setMasterName(masterName.replace("_", "/_"));
|
record.setMasterName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(masterName)) {
|
|
||||||
record.setMasterName(masterName.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TeamRecord> list = new ArrayList<>();
|
List<TeamRecord> list = new ArrayList<>();
|
||||||
|
|
@ -307,11 +291,9 @@ public class ProjectViewServiceImpl {
|
||||||
*/
|
*/
|
||||||
public List<TeamRecord> getTeamPeopleDetails(TeamRecord record) {
|
public List<TeamRecord> getTeamPeopleDetails(TeamRecord record) {
|
||||||
if (record.getPeopleName() != null) {
|
if (record.getPeopleName() != null) {
|
||||||
String name = record.getPeopleName();
|
boolean b = record.getPeopleName().matches(Constants.DISALLOWED_REGEX);
|
||||||
if (Constants.UNDERLINE.equals(name)) {
|
if (b) {
|
||||||
record.setPeopleName(name.replace("_", "/_"));
|
record.setPeopleName("/%");
|
||||||
} else if (Constants.PERCENT_SIGN.equals(name)) {
|
|
||||||
record.setPeopleName(name.replace("%", "/%"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<TeamRecord> list = new ArrayList<>();
|
List<TeamRecord> list = new ArrayList<>();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue