Commit 0c0213f7 authored by 郝彦辉's avatar 郝彦辉

非联合贷-实时数据报送sql修改

parent 0c7340ab
...@@ -168,7 +168,7 @@ public class ExZhuDaiBaiHangReSendController { ...@@ -168,7 +168,7 @@ public class ExZhuDaiBaiHangReSendController {
@RequestMapping("/manual/mainApplySend") @RequestMapping("/manual/mainApplySend")
public GlobalResponse mainApplySend(){ public GlobalResponse mainApplySend(){
try{ try{
baiHangZhuDaiService.sendHandApplyToBaiHang(); baiHangZhuDaiService.sendHandApplyToBaiHang(true,null);
return GlobalResponse.generate("百行征信助贷模式手动报送D2数据成功"); return GlobalResponse.generate("百行征信助贷模式手动报送D2数据成功");
}catch(Exception e){ }catch(Exception e){
log.error("百行征信助贷模式手动报送申请异常", e); log.error("百行征信助贷模式手动报送申请异常", e);
...@@ -186,7 +186,7 @@ public class ExZhuDaiBaiHangReSendController { ...@@ -186,7 +186,7 @@ public class ExZhuDaiBaiHangReSendController {
@RequestMapping("/manual/mainLoanInfoSend") @RequestMapping("/manual/mainLoanInfoSend")
public GlobalResponse mainLoanInfoSend(){ public GlobalResponse mainLoanInfoSend(){
try{ try{
baiHangZhuDaiService.sendHandLoaInfoReportToBaiHang(); baiHangZhuDaiService.sendHandLoaInfoReportToBaiHang(true,null);
return GlobalResponse.generate("百行征信助贷模式手动报送D2数据成功"); return GlobalResponse.generate("百行征信助贷模式手动报送D2数据成功");
}catch(Exception e){ }catch(Exception e){
log.error("百行征信助贷模式报送放款异常", e); log.error("百行征信助贷模式报送放款异常", e);
...@@ -204,7 +204,7 @@ public class ExZhuDaiBaiHangReSendController { ...@@ -204,7 +204,7 @@ public class ExZhuDaiBaiHangReSendController {
@RequestMapping("/manual/mainRepaymentLoanInfo") @RequestMapping("/manual/mainRepaymentLoanInfo")
public GlobalResponse mainRepaymentLoanInfo(){ public GlobalResponse mainRepaymentLoanInfo(){
try{ try{
baiHangZhuDaiService.sendHandRepaymentReportToBaiHang1(); baiHangZhuDaiService.sendHandRepaymentReportToBaiHang1(true,null);
return GlobalResponse.generate("百行征信助贷模式手动报送D3数据成功"); return GlobalResponse.generate("百行征信助贷模式手动报送D3数据成功");
}catch(Exception e){ }catch(Exception e){
log.error("百行征信助贷模式报送还款异常", e); log.error("百行征信助贷模式报送还款异常", e);
......
...@@ -358,10 +358,21 @@ public class BaiHangZhuDaiService { ...@@ -358,10 +358,21 @@ public class BaiHangZhuDaiService {
* 创建人: yanhui.Hao <br/> * 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.29 <br/> * 创建时间: 2019.10.29 <br/>
*/ */
public void sendHandApplyToBaiHang() throws Exception { public void sendHandApplyToBaiHang(boolean isReadFile,List<String> paramJsonStr) throws Exception {
Stopwatch sendWatch = Stopwatch.createStarted(); Stopwatch sendWatch = Stopwatch.createStarted();
List<String> handApplys = FileUtils.readLines(new File(baihangHandA1DataUrl), "utf-8"); List<String> handApplys = null;
log.info("百行征信助贷模式报送贷款申请数据, {}", JSON.toJSONString(handApplys)); if(isReadFile){
handApplys = FileUtils.readLines(new File(baihangHandA1DataUrl), "utf-8");
}else{
if(paramJsonStr==null || paramJsonStr.size()==0){
log.warn("百行征信助贷模式手动报送贷款申请错误, paramJsonStr is Null , isReadFile: {} ",isReadFile);
return;
}else{
handApplys = paramJsonStr;
}
}
log.info("百行征信助贷模式报送贷款申请数据, isReadFile: {} , handApplys: {} ", isReadFile, JSON.toJSONString(handApplys));
for(int i=0;i<handApplys.size();i++){ for(int i=0;i<handApplys.size();i++){
//try { //try {
ApplyLoanInfoZhuDai applyInfo = new Gson().fromJson(handApplys.get(i), new TypeToken<ApplyLoanInfoZhuDai>(){}.getType()); ApplyLoanInfoZhuDai applyInfo = new Gson().fromJson(handApplys.get(i), new TypeToken<ApplyLoanInfoZhuDai>(){}.getType());
...@@ -389,9 +400,20 @@ public class BaiHangZhuDaiService { ...@@ -389,9 +400,20 @@ public class BaiHangZhuDaiService {
* 创建人: yanhui.Hao <br/> * 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.29 <br/> * 创建时间: 2019.10.29 <br/>
*/ */
public void sendHandLoaInfoReportToBaiHang() throws Exception { public void sendHandLoaInfoReportToBaiHang(boolean isReadFile, List<String> paramJsonStr) throws Exception {
Stopwatch sendWatch = Stopwatch.createStarted(); Stopwatch sendWatch = Stopwatch.createStarted();
List<String> handLoanInfos = FileUtils.readLines(new File(baihangHandD2DataUrl), "utf-8"); List<String> handLoanInfos = null;
if(isReadFile){
handLoanInfos = FileUtils.readLines(new File(baihangHandD2DataUrl), "utf-8");
}else{
if(paramJsonStr==null || paramJsonStr.size()==0){
log.warn("百行征信助贷模式报送放款数据错误, paramJsonStr is Null , isReadFile: {} ",isReadFile);
return;
}else{
handLoanInfos = paramJsonStr;
}
}
log.info("百行征信助贷模式报送放款数据, {}", JSON.toJSONString(handLoanInfos)); log.info("百行征信助贷模式报送放款数据, {}", JSON.toJSONString(handLoanInfos));
for(int i=0;i<handLoanInfos.size();i++){ for(int i=0;i<handLoanInfos.size();i++){
...@@ -448,11 +470,21 @@ public class BaiHangZhuDaiService { ...@@ -448,11 +470,21 @@ public class BaiHangZhuDaiService {
* 创建人: yanhui.Hao <br/> * 创建人: yanhui.Hao <br/>
* 创建时间: 2019.10.29 <br/> * 创建时间: 2019.10.29 <br/>
*/ */
public void sendHandRepaymentReportToBaiHang1() throws Exception{ public void sendHandRepaymentReportToBaiHang1(boolean isReadFile, List<String> paramJsonStr) throws Exception{
Stopwatch sendWatch = Stopwatch.createStarted(); Stopwatch sendWatch = Stopwatch.createStarted();
List<String> repaymentLoanInfos = FileUtils.readLines(new File(baihangHandD3DataUrl), "utf-8"); List<String> repaymentLoanInfos = null;
//try { if(isReadFile){
repaymentLoanInfos = FileUtils.readLines(new File(baihangHandD3DataUrl), "utf-8");
}else{
if(paramJsonStr==null || paramJsonStr.size()==0){
log.warn("百行征信助贷模式报送还款数据错误, paramJsonStr is Null , isReadFile: {} ",isReadFile);
return;
}else{
repaymentLoanInfos = paramJsonStr;
}
}
//try {
log.info("百行征信助贷模式报送还款数据, {}", JSON.toJSONString(repaymentLoanInfos)); log.info("百行征信助贷模式报送还款数据, {}", JSON.toJSONString(repaymentLoanInfos));
for(int i=0;i<repaymentLoanInfos.size();i++){ for(int i=0;i<repaymentLoanInfos.size();i++){
RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(repaymentLoanInfos.get(i), new TypeToken<RepaymentInfoZhuDai>(){}.getType()); RepaymentInfoZhuDai repaymentLoanInfo = new Gson().fromJson(repaymentLoanInfos.get(i), new TypeToken<RepaymentInfoZhuDai>(){}.getType());
......
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