차량번호 대체문자 제거

main
이범준 5 months ago
parent a7d5b49e77
commit d41290569f

@ -91,11 +91,22 @@ public class CommHoIrregularController {
@RequestParam String in_collect_new,
@RequestParam String in_sens_time,
@RequestParam String in_auto_kind,
@RequestParam String in_key_yn
@RequestParam String in_key_yn,
HttpServletRequest request) throws Exception {
, HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
try {
in_car = TrsmrcvUtil.removeLast65533(in_car);
if(in_auto_kind.length() != 2){
in_auto_kind = "00";
}
if(in_key_yn.length() != 1){
in_key_yn = "0";
}
Map<String, Object> mapOrg = new HashMap<String, Object>();
mapOrg.put("in_id", in_id);
mapOrg.put("in_fare", in_fare);
@ -120,16 +131,9 @@ public class CommHoIrregularController {
mapOrg.put("in_carkind", in_carkind);
mapOrg.put("in_collect_new", in_collect_new);
mapOrg.put("in_sens_time", in_sens_time);
if(in_auto_kind.length() != 2){
mapOrg.put("in_auto_kind", "00");
}else{
mapOrg.put("in_auto_kind", in_auto_kind);
}
if(in_key_yn.length() != 1){
mapOrg.put("in_key_yn", "0");
}else{
mapOrg.put("in_key_yn", in_key_yn);
}
mapOrg.put("in_auto_kind", in_auto_kind);
mapOrg.put("in_key_yn", in_key_yn);
mapOrg.put("out_ret", -1);
@ -416,11 +420,13 @@ public class CommHoIrregularController {
@RequestParam String d_seq,
@RequestParam String in_car,
@RequestParam String in_carkind,
@RequestParam String c_id
, HttpServletRequest request) throws Exception {
@RequestParam String c_id,
HttpServletRequest request) throws Exception {
ResultSmartPlatform result = new ResultSmartPlatform();
try {
in_car = TrsmrcvUtil.removeLast65533(in_car);
Map<String, Object> mapOrg = new HashMap<String, Object>();
mapOrg.put("in_fare", in_fare);
mapOrg.put("in_booth", in_booth);

@ -102,4 +102,19 @@ public class TrsmrcvUtil {
map.put(keyName, Float.parseFloat(val.toString()));
}
public static String removeLast65533(String str){
if(str == null || str.equals("")){
return "";
}
CharSequence cs = str.subSequence(str.length()-1, str.length());
char lastChar = cs.charAt(0);
char REPLACEMENT_CHARACTER = 65533;
if(lastChar == REPLACEMENT_CHARACTER){
return str.substring(0, str.length()-1);
} else {
return str;
}
}
}

Loading…
Cancel
Save