Commit 3dccc655 authored by 郝彦辉's avatar 郝彦辉

D3筛选替换reqId

parent fff446ec
...@@ -131,8 +131,8 @@ public class ManualToolController { ...@@ -131,8 +131,8 @@ public class ManualToolController {
} }
@RequestMapping("/newD3ReplaceReqId") @RequestMapping("/newD3ReplaceReqId")
public String newD3ReplaceReqId(String newD3FilePath, String newD3FileNames, String oldD3ReqIdFile, String newD3InFileName, String newD3NotInFileName){ public String newD3ReplaceReqId(String newD3FilePath, String newD3FileNames, String oldD3ReqIdFile, String mapNotEmptyFile){
manualToolService.newD3ReplaceReqId(newD3FilePath,newD3FileNames,oldD3ReqIdFile,newD3InFileName,newD3NotInFileName); manualToolService.newD3ReplaceReqId(newD3FilePath,newD3FileNames,oldD3ReqIdFile,mapNotEmptyFile);
return "调用结束"; return "调用结束";
} }
......
...@@ -1812,7 +1812,7 @@ public class ManualToolService implements CommonSuperService { ...@@ -1812,7 +1812,7 @@ public class ManualToolService implements CommonSuperService {
} }
public void newD3ReplaceReqId(String newD3FilePath, String newD3FileNames, String oldD3ReqIdFile, String newD3InFileName, String newD3NotInFileName) { public void newD3ReplaceReqId(String newD3FilePath, String newD3FileNames, String oldD3ReqIdFile, String mapNotEmptyFile) {
try{ try{
List<String> oldD3ReqIdFileList = ReadOrWriteTxt.readTxtList(oldD3ReqIdFile); List<String> oldD3ReqIdFileList = ReadOrWriteTxt.readTxtList(oldD3ReqIdFile);
Map<String,String> oldD3_reqIdMap = new HashMap<>(oldD3ReqIdFileList.size()); Map<String,String> oldD3_reqIdMap = new HashMap<>(oldD3ReqIdFileList.size());
...@@ -1860,12 +1860,12 @@ public class ManualToolService implements CommonSuperService { ...@@ -1860,12 +1860,12 @@ public class ManualToolService implements CommonSuperService {
repaymentLoanInfo.setReqID(oldD3_reqIdMap.get(key_replace)); repaymentLoanInfo.setReqID(oldD3_reqIdMap.get(key_replace));
repaymentLoanInfo.setOpCode("M"); repaymentLoanInfo.setOpCode("M");
//是要删除,D3_035 //是要删除,D3_035
FileUtils.write(new File(newD3InFileName), JSON.toJSONString(repaymentLoanInfo)+"\r\n", "UTF-8", true); FileUtils.write(new File(newD3FilePath+"in_new_"+fileName), JSON.toJSONString(repaymentLoanInfo)+"\r\n", "UTF-8", true);
oldD3_reqIdMap.remove(key_replace); oldD3_reqIdMap.remove(key_replace);
}else{ }else{
notHave++; notHave++;
FileUtils.write(new File(newD3NotInFileName), JSON.toJSONString(repaymentLoanInfo)+"\r\n", "UTF-8", true); FileUtils.write(new File(newD3FilePath+"notIn_new_"+fileName), JSON.toJSONString(repaymentLoanInfo)+"\r\n", "UTF-8", true);
} }
} catch (Exception e) { } catch (Exception e) {
log.error(fileName+":筛选替换 error,", e); log.error(fileName+":筛选替换 error,", e);
...@@ -1886,7 +1886,7 @@ public class ManualToolService implements CommonSuperService { ...@@ -1886,7 +1886,7 @@ public class ManualToolService implements CommonSuperService {
for(String key : oldD3_reqIdMap.keySet()){ for(String key : oldD3_reqIdMap.keySet()){
log.info("oldD3_reqIdMap wr:"+(wr++)); log.info("oldD3_reqIdMap wr:"+(wr++));
try { try {
FileUtils.write(new File(newD3FilePath+"oldD3_reqIdMap.txt"), oldD3_reqIdMap.get(key)+"="+oldD3_reqIdMap+"\r\n", "UTF-8", true); FileUtils.write(new File(mapNotEmptyFile), oldD3_reqIdMap.get(key)+"="+oldD3_reqIdMap+"\r\n", "UTF-8", true);
} catch (IOException e) { } catch (IOException e) {
log.error("oldD3_reqIdMap 写入 error ", e); log.error("oldD3_reqIdMap 写入 error ", e);
} }
......
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