Commit 81ca39a3 authored by 郝彦辉's avatar 郝彦辉

D3筛选工具开发

parent 610e8fd6
......@@ -1084,7 +1084,7 @@ public class ManualToolService implements CommonSuperService {
/**
* 描述: 删除掉D3中本LoanId一样,本次还款金额 实际还款时间 为空的一条 <br/>
* 描述: 删除掉D3中本LoanId一样,本次还款金额&实际还款时间 为空的一条 <br/>
* |awk -F ',"' '{print $1 $17 "\"" $14}' |awk -F '"' '{print $4 $6"_"$9}' |sort |uniq -c |awk '$1 > 1 {print $1}' |more
* 参数: [oldDataFile, cfLoanIdLogFile, newDataFile] <br/>
* 返回值: java.lang.String <br/>
......@@ -1725,6 +1725,76 @@ public class ManualToolService implements CommonSuperService {
}
}
}
//===============================================================================================
public static void d3_logicerror_20191223() {
List<String> logicerror_other_List = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\生产p2p新\\log\\all_err_other_reqID.tmp");
Map<String,String> err_other_reqIdMap = new HashMap<>(logicerror_other_List.size());
int c1 = 0;
for (String reqId : logicerror_other_List){
c1++;
err_other_reqIdMap.put(reqId, ""+c1);
}
System.out.println("err_other_reqIdMap 大小:"+err_other_reqIdMap.size());
logicerror_other_List = null;
List<String> logicerror_035_List = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\生产p2p新\\log\\all_err_D3_035_reqID.tmp");
Map<String,String> err_035_reqIdMap = new HashMap<>(logicerror_035_List.size());
int c2 = 0;
for (String reqId : logicerror_035_List){
c2++;
err_035_reqIdMap.put(reqId, ""+c2);
}
System.out.println("err_035_reqIdMap 大小:"+err_035_reqIdMap.size());
logicerror_035_List = null;
manualGC();
String[] all_id3_fileNames = {"ok1_D3_20161101_20180801.txt","ok2_D3_20180801_20181117.txt","ok3_D3_20181117_20190201.txt",
"ok4_D3_20190201_20190410.txt","ok5_D3_20190410_20190701.txt","ok6_D3_20190701_20190910.txt","ok9_D3_20191025_0027.txt"};
List<String> d3lineList = null;
RepaymentInfoZhuDai repaymentLoanInfo = null;
for(String fileName : all_id3_fileNames){
d3lineList = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\生产p2p新\\"+fileName);
System.out.println("lineList:"+ fileName + ", size:"+d3lineList.size());
for(int i=0;i<d3lineList.size();i++){
System.out.println(fileName+":"+i);
try {
String d3JsonStr = d3lineList.get(i);
if(d3JsonStr.length()<30){
continue;
}
repaymentLoanInfo = new Gson().fromJson(d3JsonStr, new TypeToken<RepaymentInfoZhuDai>(){}.getType());
if(err_035_reqIdMap.containsKey(repaymentLoanInfo.getReqID())){
//是要删除,D3_035
FileUtils.write(new File("D:\\用户目录\\Downloads\\生产p2p新\\build_ok\\err_035_"+fileName), d3JsonStr+"\n", "UTF-8", true);
}else if(err_other_reqIdMap.containsKey(repaymentLoanInfo.getReqID())){
FileUtils.write(new File("D:\\用户目录\\Downloads\\生产p2p新\\build_ok\\err_other_"+fileName), d3JsonStr+"\n", "UTF-8", true);
}else{
FileUtils.write(new File("D:\\用户目录\\Downloads\\生产p2p新\\build_ok\\build_"+fileName), d3JsonStr+"\n", "UTF-8", true);
String key_replace = repaymentLoanInfo.getLoanId()+"|"+repaymentLoanInfo.getTermNo()+"|"+repaymentLoanInfo.getStatusConfirmAt()
+"|ts:"+repaymentLoanInfo.getTermStatus()+"|ls:"+repaymentLoanInfo.getLoanStatus()
+"="+repaymentLoanInfo.getReqID();
FileUtils.write(new File("D:\\用户目录\\Downloads\\生产p2p新\\build_ok\\replace_"+fileName), key_replace+"\n", "UTF-8", true);
}
} catch (Exception e) {
System.err.println(fileName+":build D3 data error,"+e.toString());
}
}
System.out.println(fileName+":build D3 end.");
}
System.out.println("All d3_logicerror_20191223() end.");
}
public static void main(String[] args) {
......@@ -1772,10 +1842,13 @@ public class ManualToolService implements CommonSuperService {
//d3_logicerror_fengxi3();
remove_D3_loanId_chunfu("D:\\JavaTeam\\test\\sc_D3_20161101_20180801_1.txt","D:\\JavaTeam\\test\\errLoand.txt",
/*remove_D3_loanId_chunfu("D:\\JavaTeam\\test\\sc_D3_20161101_20180801_1.txt","D:\\JavaTeam\\test\\errLoand.txt",
"D:\\JavaTeam\\test\\ok1_sc_D3.txt",
"D:\\JavaTeam\\test\\rm_byId_err.txt",
"D:\\JavaTeam\\test\\rm_byPhone_err.txt");
"D:\\JavaTeam\\test\\rm_byPhone_err.txt");*/
d3_logicerror_20191223();
}
......
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