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

修改优化

parent dfc13918
...@@ -130,7 +130,7 @@ public class BaiHangZhuDaiService { ...@@ -130,7 +130,7 @@ public class BaiHangZhuDaiService {
log.error("初始化百行助贷PublicKey实例", e); log.error("初始化百行助贷PublicKey实例", e);
} }
try{ /*try{
long log_stUtc2 = System.currentTimeMillis(); long log_stUtc2 = System.currentTimeMillis();
List<String> contextList = FileUtils.readLines(new File(zl_file_path_name + "TEST_BS_USER_TM_201911061315.txt"), "utf-8"); List<String> contextList = FileUtils.readLines(new File(zl_file_path_name + "TEST_BS_USER_TM_201911061315.txt"), "utf-8");
if(contextList!=null && contextList.size()>0){ if(contextList!=null && contextList.size()>0){
...@@ -144,7 +144,7 @@ public class BaiHangZhuDaiService { ...@@ -144,7 +144,7 @@ public class BaiHangZhuDaiService {
log.info("初始化测试环境百行报送-用户三要素脱敏字典结束, 耗时: {} ",System.currentTimeMillis()-log_stUtc2); log.info("初始化测试环境百行报送-用户三要素脱敏字典结束, 耗时: {} ",System.currentTimeMillis()-log_stUtc2);
}catch(Exception e){ }catch(Exception e){
log.error("初始化测试环境百行报送-用户三要素脱敏字典异常", e); log.error("初始化测试环境百行报送-用户三要素脱敏字典异常", e);
} }*/
} }
...@@ -1110,64 +1110,6 @@ public class BaiHangZhuDaiService { ...@@ -1110,64 +1110,6 @@ public class BaiHangZhuDaiService {
} }
/*private static void convertRepaymentLoanInfo() {
try {
String readAddr = "/Users/fengjunkai/Documents/鹰潭市信江广达小额贷款股份有限公司_D3_201904011543_0003.json";
String sourceStr = FileUtils.readFileToString(new File(readAddr), "utf-8");
String writeAddr = "/Users/fengjunkai/Documents/baihang_test_data_file/鹰潭市信江广达小额贷款股份有限公司_D3_20190401_0003.txt";
JSONObject sourceJson = JSON.parseObject(sourceStr);
JSONArray recordsJsonArr = sourceJson.getJSONArray("RECORDS");
FileUtils.write(new File(writeAddr), "#singleLoanRepayInfo" + "\r\n", "utf-8", true);
for (int i = 0; i < recordsJsonArr.size(); i++) {
JSONObject recordJson = recordsJsonArr.getJSONObject(i);
FileUtils.write(new File(writeAddr), JSON.toJSONString(recordJson) + "\r\n", "utf-8", true);
}
System.out.println("完事");
} catch (IOException e) {
e.printStackTrace();
}
}*/
/*private static void convertLoanInfo() {
try {
String readAddr = "/Users/fengjunkai/Documents/鹰潭市信江广达小额贷款股份有限公司_D2_201904011543_0002.json";
String sourceStr = FileUtils.readFileToString(new File(readAddr), "utf-8");
String writeAddr = "/Users/fengjunkai/Documents/baihang_test_data_file/鹰潭市信江广达小额贷款股份有限公司_D2_20190401_0002.txt";
JSONObject sourceJson = JSON.parseObject(sourceStr);
JSONArray recordsJsonArr = sourceJson.getJSONArray("RECORDS");
FileUtils.write(new File(writeAddr), "#singleLoanAccountInfo" + "\r\n", "utf-8", true);
for (int i = 0; i < recordsJsonArr.size(); i++) {
JSONObject recordJson = recordsJsonArr.getJSONObject(i);
FileUtils.write(new File(writeAddr), JSON.toJSONString(recordJson) + "\r\n", "utf-8", true);
}
System.out.println("完事");
} catch (Exception e) {
e.printStackTrace();
}
}
*/
/*private static void convertApplyLoanInfo() {
try {
String readAddr = "/Users/fengjunkai/Documents/鹰潭市信江广达小额贷款股份有限公司_C1_201904011543_0001.json";
String writeAddr = "/Users/fengjunkai/Documents/baihang_test_data_file/鹰潭市信江广达小额贷款股份有限公司_C1_20190401_0001.txt";
String sourceStr = FileUtils.readFileToString(new File(readAddr), "utf-8");
JSONObject sourceJson = JSON.parseObject(sourceStr);
JSONArray recordsJsonArr = sourceJson.getJSONArray("RECORDS");
FileUtils.write(new File(writeAddr), "#loanApplyInfo" + "\r\n", "utf-8", true);
for (int i = 0; i < recordsJsonArr.size(); i++) {
JSONObject recordJson = recordsJsonArr.getJSONObject(i);
FileUtils.write(new File(writeAddr), JSON.toJSONString(recordJson) + "\r\n", "utf-8", true);
}
System.out.println("完事");
} catch (Exception e) {
e.printStackTrace();
}
}*/
//test2.接口测试 手动调用 //test2.接口测试 手动调用
@Deprecated @Deprecated
public String apiSend(String type,String startDate, String endDate) { public String apiSend(String type,String startDate, String endDate) {
...@@ -1386,6 +1328,9 @@ public class BaiHangZhuDaiService { ...@@ -1386,6 +1328,9 @@ public class BaiHangZhuDaiService {
//用户三要素脱敏后数据写一份 //用户三要素脱敏后数据写一份
private void testTuoMinFileWrite(String fileName,String startDate, ApplyLoanInfoZhuDai bean_a1, LoanInfoZhuDaiVo bean_d2, RepaymentInfoZhuDai bean_d3) { private void testTuoMinFileWrite(String fileName,String startDate, ApplyLoanInfoZhuDai bean_a1, LoanInfoZhuDaiVo bean_d2, RepaymentInfoZhuDai bean_d3) {
}
//2019.11.15 17:39
private void testTuoMinFileWrite_not_used(String fileName,String startDate, ApplyLoanInfoZhuDai bean_a1, LoanInfoZhuDaiVo bean_d2, RepaymentInfoZhuDai bean_d3) {
String pid = null, mapVal = null, jsonContext = ""; String pid = null, mapVal = null, jsonContext = "";
try { try {
if (bean_a1 != null) { if (bean_a1 != null) {
...@@ -1476,31 +1421,6 @@ public class BaiHangZhuDaiService { ...@@ -1476,31 +1421,6 @@ public class BaiHangZhuDaiService {
} }
public static void main(String[] args) {
/*LocalDateTime erlyDate = LocalDateTime.parse("2019-05-01T00:00:00");
LocalDateTime endDate = LocalDateTime.parse("2019-05-10T00:00:00");
int counter = 0;
while (true) {
counter++;
if (erlyDate.plusDays(counter).compareTo(endDate) > 0) {
break;
}
String starTime = erlyDate.plusDays(counter - 1).format(DateTimeFormatter.ISO_DATE);
String endTime = erlyDate.plusDays(counter).format(DateTimeFormatter.ISO_DATE);
System.out.println("starTime="+starTime+",endTime="+endTime);
}*/
/* AtomicBoolean D2_Stop = new AtomicBoolean(false);
System.out.println(D2_Stop.get());
D2_Stop.set(true);
System.out.println(D2_Stop.get());*/
//构建D3
}
public String build_stockRepayMentInfoZhuDai(String jsonFile) throws IOException { public String build_stockRepayMentInfoZhuDai(String jsonFile) throws IOException {
String sourceStr = FileUtils.readFileToString(new File(jsonFile), "utf-8"); String sourceStr = FileUtils.readFileToString(new File(jsonFile), "utf-8");
JSONObject sourceJson = JSON.parseObject(sourceStr); JSONObject sourceJson = JSON.parseObject(sourceStr);
......
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