Commit e61196e3 authored by 郝彦辉's avatar 郝彦辉

工具优化。

parent f641dfc1
......@@ -44,7 +44,7 @@ public class ManualToolController {
try{
return manualToolService.sendBaiHangData(p1,p2,p3,p4,p5,secretKey,isSend,errorCode, isProduct, sendIncludeType);
}catch (Exception e){
log.error("百行征信手动报送异常, {} , {} ", e.getMessage(), e);
log.error("众信利民助贷模式To百行征信手动报送异常, {} , {} ", e.getMessage(), e);
return GlobalResponse.generate(e.getMessage());
}
}
......
......@@ -3134,6 +3134,109 @@ public class ManualToolService implements CommonSuperService {
}
private static void application_build() {
try{
String path = "C:\\Users\\Administrator\\Desktop\\配置转换\\";
List<String> jsonList_1 = ReadOrWriteTxt.readTxtList(path+"application-release.filter");
HashMap<String,String> map_recordId = new HashMap<>();
int index=0;
for(String str : jsonList_1){
str = str.trim();
log.info(str);
if(str.length()<1 || str.startsWith("#")){
continue;
}
String[] arry= str.split("=");
if(arry.length>1){
map_recordId.put(arry[0].trim(), arry[1].trim());
}else{
map_recordId.put(arry[0].trim(), "");
}
}
log.info("d3_build_manua() read files jsonList_1 size:{} , map_recordId siez:{} ", jsonList_1.size(), map_recordId.size());
List<String> d3JsonList_hk = ReadOrWriteTxt.readTxtList(path+"application.properties");
log.info("d3_build_manua() files d3JsonList_hk size="+d3JsonList_hk.size());
List<String> okList = new ArrayList<>();
for (String line: d3JsonList_hk){
String tmp = line.trim();
log.info(tmp);
if(tmp.length()<1){
log.info(tmp);
}
else if(tmp.startsWith("#")){
okList.add("\n");
okList.add(tmp);
}else{
if(tmp.contains("@")){
String[] msgs = tmp.split("=");
String[] params = msgs[1].split("@");
String pp = "";
for(String t : params){
if(t.length()>5){
pp+=map_recordId.get(t);
}else if(t.length()>1 && t.length() <5){
pp+=t;
}else{
log.warn(tmp);
}
}
okList.add(msgs[0] +"="+ pp);
} else{
if(tmp.contains("=")){
okList.add(tmp);
}else{
log.error("OTHER:"+tmp);
}
}
}
}
for (String line: okList){
log.info(line);
}
log.info("结束");
}catch (Exception e){
log.error("d3_build_manua()处理还款记录异常!", e);
}
}
private static void check_application() {
try{
String path = "C:\\Users\\Administrator\\Desktop\\配置转换\\";
List<String> jsonList_1 = ReadOrWriteTxt.readTxtList(path+"原448.txt");
HashMap<String,String> map_recordId = new HashMap<>();
int index=0;
for(String str : jsonList_1){
str = str.trim();
if(str.contains("@")){
String[] arry= str.split("@");
if(arry.length>2){
log.info(str);
}
}
/* log.info(str);
if(str.startsWith("#")){
map_recordId.put(str, str);
}else{
String[] arry= str.split("=");
map_recordId.put(arry[0].trim(), str);
}*/
}
log.info("d3_build_manua() read files jsonList_1 size:{} , map_recordId siez:{} ", jsonList_1.size(), map_recordId.size());
}catch (Exception e){
log.error("d3_build_manua()处理还款记录异常!", e);
}
}
public static void main(String[] args) {
......@@ -3219,9 +3322,10 @@ public class ManualToolService implements CommonSuperService {
//d2_build_manual();
//d3_build_checkCF();
//d3_build_manua();
checkTGd3_build();
//checkTGd3_build();
application_build();
//check_application();
}
......
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