|
|
|
@ -21,11 +21,10 @@ package testserver.wsdlserver.lvisserver;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.logging.Logger;
|
|
|
|
|
import java.util.regex.Matcher;
|
|
|
|
|
import java.util.regex.Pattern;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
import cokr.xit.applib.AppCmmnUtil;
|
|
|
|
|
import cokr.xit.foundation.data.DataObject;
|
|
|
|
|
import externalsystem.car.dao.CarMapper;
|
|
|
|
|
import externalsystem.testpool.dao.TestPoolMapper;
|
|
|
|
@ -63,7 +62,7 @@ public class CarRegBasicInfoImpl implements CarRegBasicInfo {
|
|
|
|
|
DataObject carInfo = carMapper.selectCar(vhrno);
|
|
|
|
|
|
|
|
|
|
if(carInfo == null && !vhrno.equals("")) {
|
|
|
|
|
if(isValidCarNumber(vhrno)) {
|
|
|
|
|
if(AppCmmnUtil.isValidCarNumber(vhrno)) {
|
|
|
|
|
DataObject randMber = testPoolMapper.selectRandomMber();
|
|
|
|
|
DataObject randAddr= testPoolMapper.selectRandomAddr();
|
|
|
|
|
DataObject randCarBasic = testPoolMapper.selectRandomCarBasic();
|
|
|
|
@ -132,32 +131,6 @@ public class CarRegBasicInfoImpl implements CarRegBasicInfo {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean isValidCarNumber(String carNum){
|
|
|
|
|
|
|
|
|
|
boolean returnValue = false;
|
|
|
|
|
|
|
|
|
|
try{
|
|
|
|
|
String regex = "^\\d{2,3}[가|나|다|라|마|거|너|더|러|머|버|서|어|저|고|노|도|로|모|보|소|오|조|구|누|두|루|무|부|수|우|주|바|사|아|자|허|배|호|하\\x20]\\d{4}/*$";
|
|
|
|
|
|
|
|
|
|
Pattern p = Pattern.compile(regex);
|
|
|
|
|
Matcher m = p.matcher(carNum);
|
|
|
|
|
if (m.matches()) {
|
|
|
|
|
returnValue = true;
|
|
|
|
|
}else{
|
|
|
|
|
//2번째 패턴 처리
|
|
|
|
|
regex = "^[서울|부산|대구|인천|대전|광주|울산|제주|경기|강원|충남|전남|전북|경남|경북|세종]{2}\\d{2}[가|나|다|라|마|거|너|더|러|머|버|서|어|저|고|노|도|로|모|보|소|오|조|구|누|두|루|무|부|수|우|주|바|사|아|자|허|배|호|하\\x20]\\d{4}$";
|
|
|
|
|
p = Pattern.compile(regex);
|
|
|
|
|
m = p.matcher(carNum);
|
|
|
|
|
if (m.matches()) {
|
|
|
|
|
returnValue = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return returnValue;
|
|
|
|
|
|
|
|
|
|
}catch(Exception e){
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|