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

D2手动报送工具优化。

parent 3ba3a5f4
...@@ -137,9 +137,9 @@ public class ExZhuDaiBaiHangReSendController { ...@@ -137,9 +137,9 @@ public class ExZhuDaiBaiHangReSendController {
* 创建时间: 2019.10.29 <br/> * 创建时间: 2019.10.29 <br/>
*/ */
@RequestMapping("/manual/buquan/mainLoanInfoSend") @RequestMapping("/manual/buquan/mainLoanInfoSend")
public GlobalResponse mainLoanInfoSend(){ public GlobalResponse mainLoanInfoSend(String isSaveLogBean){
try{ try{
baiHangZhuDaiService.sendHandLoaInfoReportToBaiHang2(true,null); baiHangZhuDaiService.sendHandLoaInfoReportToBaiHang2(true,null,isSaveLogBean);
return GlobalResponse.generate("百行征信助贷模式手动报送D2数据成功"); return GlobalResponse.generate("百行征信助贷模式手动报送D2数据成功");
}catch(Exception e){ }catch(Exception e){
log.error("百行征信助贷模式报送放款异常", e); log.error("百行征信助贷模式报送放款异常", e);
......
...@@ -616,7 +616,7 @@ public class BaiHangZhuDaiService { ...@@ -616,7 +616,7 @@ public class BaiHangZhuDaiService {
} }
//D2手动报送,有账单日列表,和totalTerm //D2手动报送,有账单日列表,和totalTerm
public void sendHandLoaInfoReportToBaiHang2(boolean isReadFile, List<String> paramJsonStr) throws Exception { public void sendHandLoaInfoReportToBaiHang2(boolean isReadFile, List<String> paramJsonStr, String isSaveLogBean) throws Exception {
Stopwatch sendWatch = Stopwatch.createStarted(); Stopwatch sendWatch = Stopwatch.createStarted();
List<String> handLoanInfos = null; List<String> handLoanInfos = null;
if(isReadFile){ if(isReadFile){
...@@ -630,6 +630,11 @@ public class BaiHangZhuDaiService { ...@@ -630,6 +630,11 @@ public class BaiHangZhuDaiService {
} }
} }
boolean is_saveLogBean = false;
if(StringUtils.isNotEmpty(isSaveLogBean) && "true".equals(isSaveLogBean)){
is_saveLogBean = true;
}
for(int i=0;i<handLoanInfos.size();i++){ for(int i=0;i<handLoanInfos.size();i++){
try{ try{
if(handLoanInfos.get(i).length()<30){ if(handLoanInfos.get(i).length()<30){
...@@ -637,14 +642,15 @@ public class BaiHangZhuDaiService { ...@@ -637,14 +642,15 @@ public class BaiHangZhuDaiService {
} }
LoanInfoZhuDai loanInfozd_tmp = new Gson().fromJson(handLoanInfos.get(i), new TypeToken<LoanInfoZhuDai>(){}.getType()); LoanInfoZhuDai loanInfozd_tmp = new Gson().fromJson(handLoanInfos.get(i), new TypeToken<LoanInfoZhuDai>(){}.getType());
JSONObject businessJson = JSONObject.parseObject(handLoanInfos.get(i)).getJSONObject("finTechAgencyBusiness"); if(!is_saveLogBean){
JSONObject businessJson = JSONObject.parseObject(handLoanInfos.get(i)).getJSONObject("finTechAgencyBusiness");
loanInfozd_tmp.setInstitutionalFundingPartner(businessJson.containsKey("institutionalFundingPartner") ? businessJson.getString("institutionalFundingPartner") : null); loanInfozd_tmp.setInstitutionalFundingPartner(businessJson.containsKey("institutionalFundingPartner") ? businessJson.getString("institutionalFundingPartner") : null);
loanInfozd_tmp.setInstitutionalFundingPartnerID(businessJson.containsKey("institutionalFundingPartnerID") ? businessJson.getString("institutionalFundingPartnerID") : null); loanInfozd_tmp.setInstitutionalFundingPartnerID(businessJson.containsKey("institutionalFundingPartnerID") ? businessJson.getString("institutionalFundingPartnerID") : null);
loanInfozd_tmp.setRelationID(businessJson.containsKey("relationID") ? businessJson.getString("relationID") : null); loanInfozd_tmp.setRelationID(businessJson.containsKey("relationID") ? businessJson.getString("relationID") : null);
loanInfozd_tmp.setInstitutionalFundingPartnerLoanID(businessJson.containsKey("institutionalFundingPartnerLoanID") ? businessJson.getString("institutionalFundingPartnerLoanID") : null); loanInfozd_tmp.setInstitutionalFundingPartnerLoanID(businessJson.containsKey("institutionalFundingPartnerLoanID") ? businessJson.getString("institutionalFundingPartnerLoanID") : null);
loanInfozd_tmp.setOrderID(businessJson.containsKey("orderID") ? businessJson.getString("orderID") : null); loanInfozd_tmp.setOrderID(businessJson.containsKey("orderID") ? businessJson.getString("orderID") : null);
loanInfozd_tmp.setPreCreditLimit(businessJson.containsKey("preCreditLimit") ? businessJson.getBigDecimal("preCreditLimit") : null); loanInfozd_tmp.setPreCreditLimit(businessJson.containsKey("preCreditLimit") ? businessJson.getBigDecimal("preCreditLimit") : null);
}
log.info("众信利民助贷模式TO百行手动报送放款单个数据, {}", JSON.toJSONString(loanInfozd_tmp)); log.info("众信利民助贷模式TO百行手动报送放款单个数据, {}", JSON.toJSONString(loanInfozd_tmp));
String loanInfoReqId = loanInfozd_tmp.getReqID(); String loanInfoReqId = loanInfozd_tmp.getReqID();
......
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