Commit 48eaf413 authored by 郝彦辉's avatar 郝彦辉

A1要求uploadTs时间为真实时间

parent c69c2ec3
...@@ -1002,6 +1002,104 @@ public class ManualToolService implements CommonSuperService { ...@@ -1002,6 +1002,104 @@ public class ManualToolService implements CommonSuperService {
public static void buildA1_uploadTs(String newJsonFile, String oldJsonFile) {
newJsonFile = "D:\\用户目录\\Downloads\\生产数据\\new_lhp_A1_20170209_20191025_01.txt";
String fileName = "D:\\用户目录\\Downloads\\生产数据\\new201911181620_lhp_A1_20170209_20191025_01.txt";
List<String> newJsonList = ReadOrWriteTxt.readTxtList(newJsonFile);
System.out.println("newJsonList大小:"+newJsonList.size());
for(int i=0; i< newJsonList.size(); i++){
System.out.println("Start:"+i);
String strJson = newJsonList.get(i);
if(strJson.length() < 30 ){//#applyInfo #singleLoanAccountInfo
continue;
}
ApplyLoanInfoZhuDai applyInfo = new Gson().fromJson(strJson, new TypeToken<ApplyLoanInfoZhuDai>(){}.getType());
if(applyInfo.getApplyDate()!=null){
applyInfo.setUploadTs(applyInfo.getApplyDate());//applyDate
}
applyInfo.setOpCode("M");
try {
FileUtils.write(new File(fileName), JSON.toJSONString(applyInfo)+"\r\n", "UTF-8", true);
} catch (IOException e) {
System.err.println("build data,"+e);
}
}
System.err.println("build data buildA1_uploadTs end.");
}
public static void buildD2_uploadTs(String newJsonFile, String oldJsonFile) {
newJsonFile = "D:\\用户目录\\Downloads\\生产数据\\uploadTs_M_201911181718\\new_lhp_D2_20170209_20191025_01.txt";
String fileName = "D:\\用户目录\\Downloads\\生产数据\\uploadTs_M_201911181718\\new201911181720_D2_20170209_20191025_01.txt";
List<String> newJsonList = ReadOrWriteTxt.readTxtList(newJsonFile);
System.out.println("newJsonList大小:"+newJsonList.size());
for(int i=0; i< newJsonList.size(); i++){
System.out.println("Start:"+i);
String strJson = newJsonList.get(i);
if(strJson.length() < 30 ){//#applyInfo #singleLoanAccountInfo
continue;
}
LoanInfoZhuDai loanInfozd_tmp = new Gson().fromJson(strJson, new TypeToken<LoanInfoZhuDai>(){}.getType());
if(loanInfozd_tmp.getApplyDate()!=null){
loanInfozd_tmp.setUploadTs(loanInfozd_tmp.getIssueDate()); //issueDate
}
loanInfozd_tmp.setOpCode("M");
try {
FileUtils.write(new File(fileName), JSON.toJSONString(loanInfozd_tmp)+"\r\n", "UTF-8", true);
} catch (IOException e) {
System.err.println("build data,"+e);
}
}
System.err.println("build data buildD2_uploadTs end.");
}
public static void buildD3_uploadTs(String newJsonFile, String oldJsonFile) {
newJsonFile = "D:\\用户目录\\Downloads\\生产数据\\uploadTs_M_201911181718\\bak1\\new_D3_01.txt";
String fileName = "D:\\用户目录\\Downloads\\生产数据\\uploadTs_M_201911181718\\new201911181720_D3_01.txt";
List<String> newJsonList = ReadOrWriteTxt.readTxtList(newJsonFile);
System.out.println("newJsonList大小:"+newJsonList.size());
Map<String,String> new_uploadTs_Map = new HashMap<>(newJsonList.size());
for(int i=0; i< newJsonList.size(); i++){
System.out.println("Start:"+i);
String strJson = newJsonList.get(i);
if(strJson.length() < 30 ){//#applyInfo #singleLoanAccountInfo
continue;
}
RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(strJson, new TypeToken<RepaymentInfoZhuDai>(){}.getType());
if("normal".equals(repaymentLoanInfo.getTermStatus().trim()) ){
repaymentLoanInfo.setUploadTs(repaymentLoanInfo.getRealRepaymentDate());//realRepaymentDate
}else {
//overdue
repaymentLoanInfo.setUploadTs(repaymentLoanInfo.getStatusConfirmAt());//statusConfirmAt
}
repaymentLoanInfo.setOpCode("M");
try {
FileUtils.write(new File(fileName), JSON.toJSONString(repaymentLoanInfo)+"\r\n", "UTF-8", true);
} catch (IOException e) {
System.err.println("build data,"+e);
}
}
System.err.println("build data buildD3_uploadTs end.");
}
public static void main(String[] args) { public static void main(String[] args) {
// List<String> lineList = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\D2_M_01.txt"); // List<String> lineList = ReadOrWriteTxt.readTxtList("D:\\用户目录\\Downloads\\D2_M_01.txt");
...@@ -1034,13 +1132,13 @@ public class ManualToolService implements CommonSuperService { ...@@ -1034,13 +1132,13 @@ public class ManualToolService implements CommonSuperService {
// private static final String P2_48MD5 = "d4893490905d534e6fc1512ba6619d14df8c312362589342"; // private static final String P2_48MD5 = "d4893490905d534e6fc1512ba6619d14df8c312362589342";
// private static final String P3_48MD5 = "57971a003213360c6fa09f4b257d5eb5441ba97a5450aa63"; // private static final String P3_48MD5 = "57971a003213360c6fa09f4b257d5eb5441ba97a5450aa63";
//
// System.out.println(MD5Util.get48Md5("172.20.1.92")); // System.out.println(MD5Util.get48Md5("172.20.1.92"));
// System.out.println(MD5Util.verify48Md5("root2","d4893490905d534e6fc1512ba6619d14df8c312362589342"));
System.out.println(MD5Util.verify48Md5("root2","d4893490905d534e6fc1512ba6619d14df8c312362589342"));
//buildA1_uploadTs(null,null);
//buildD2_uploadTs(null,null);
buildD3_uploadTs(null,null);
} }
} }
...@@ -61,11 +61,7 @@ ...@@ -61,11 +61,7 @@
select select
a.id reqID a.id reqID
,'A' opCode ,'A' opCode
-- ,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs ,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,DATE_FORMAT(case when i.created_at is null and h.created_at &lt;= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
else i.created_at end,'%Y-%m-%dT%H:%i:%S') as uploadTs
,'1' isFinTechAgencyBusiness ,'1' isFinTechAgencyBusiness
,DATE_FORMAT(case when i.created_at is null and h.created_at &lt;= f.created_at then h.created_at ,DATE_FORMAT(case when i.created_at is null and h.created_at &lt;= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at when i.created_at is null and h.created_at>f.created_at then f.created_at
...@@ -119,11 +115,7 @@ ...@@ -119,11 +115,7 @@
select select
a.id reqID a.id reqID
,'A' opCode ,'A' opCode
-- ,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs ,DATE_FORMAT(now(),'%Y-%m-%dT%H:%i:%S') uploadTs
,DATE_FORMAT(case when i.created_at is null and h.created_at &lt;= f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at
else i.created_at end,'%Y-%m-%dT%H:%i:%S') as uploadTs
,'1' isFinTechAgencyBusiness ,'1' isFinTechAgencyBusiness
,DATE_FORMAT(case when i.created_at is null and h.created_at &lt;=f.created_at then h.created_at ,DATE_FORMAT(case when i.created_at is null and h.created_at &lt;=f.created_at then h.created_at
when i.created_at is null and h.created_at>f.created_at then f.created_at when i.created_at is null and h.created_at>f.created_at then f.created_at
......
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