Commit 4436aff5 by zhangxingmin

push

parent 22e39b42
......@@ -242,11 +242,12 @@ public class ApiCsfCommonServiceImpl implements ApiCsfCommonService {
public static void main(String[] args) {
ApiCsfCommonServiceImpl commonService = new ApiCsfCommonServiceImpl();
ApiCsfCalculateRequest request = new ApiCsfCalculateRequest();
request.setRequestValue("310111202603191111");
request.setCalculateType(6);
Result<List<ApiCsfCalculateResponse>> result = commonService.calculate(request);
System.out.println(result);
System.out.println(commonService.convertChineseToPinyin("吕姐"));
// ApiCsfCalculateRequest request = new ApiCsfCalculateRequest();
// request.setRequestValue("310111202603191111");
// request.setCalculateType(6);
// Result<List<ApiCsfCalculateResponse>> result = commonService.calculate(request);
// System.out.println(result);
}
/**
......@@ -343,8 +344,8 @@ public class ApiCsfCommonServiceImpl implements ApiCsfCommonService {
if (pinyinArray != null && pinyinArray.length > 0) {
String py = pinyinArray[0];
// 将 ü / Ü 替换为 v / V
py = py.replace("ü", "v").replace("Ü", "V");
// 移除可能出现的冒号或其他非字母字符(仅保留字母和空格
py = py.replace("U:","V").replace("u:","v").replace("ü", "v").replace("Ü", "V");
// 移除所有非字母字符(如冒号
py = py.replaceAll("[^A-Z]", "");
if (StringUtils.isBlank(py)) {
py = String.valueOf(c);
......@@ -370,5 +371,4 @@ public class ApiCsfCommonServiceImpl implements ApiCsfCommonService {
return pinyin.toString();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment