Commit 4a31a5be authored by 郝彦辉's avatar 郝彦辉

添加注释,及日志输出

parent 02711475
...@@ -100,6 +100,7 @@ public class ReportController { ...@@ -100,6 +100,7 @@ public class ReportController {
return result; return result;
} }
//下载报送的文件
@RequestMapping("/dowloadFile") @RequestMapping("/dowloadFile")
public void dowloadFile(String filePath, HttpServletResponse response) throws Exception { public void dowloadFile(String filePath, HttpServletResponse response) throws Exception {
...@@ -160,6 +161,7 @@ public class ReportController { ...@@ -160,6 +161,7 @@ public class ReportController {
return result; return result;
} }
//txt文件上报
@RequestMapping("/upDataByFile") @RequestMapping("/upDataByFile")
public Map<String, Object> upDataByFile(@RequestParam("file") MultipartFile file, String type, String fileType) { public Map<String, Object> upDataByFile(@RequestParam("file") MultipartFile file, String type, String fileType) {
Map<String, Object> result = new HashMap<>(); Map<String, Object> result = new HashMap<>();
...@@ -193,6 +195,7 @@ public class ReportController { ...@@ -193,6 +195,7 @@ public class ReportController {
return result; return result;
} }
//zip文件上报
@RequestMapping("/upDataByZipFile") @RequestMapping("/upDataByZipFile")
public Map<String, Object> upDataByZipFile(FileEntry fileEntry) { public Map<String, Object> upDataByZipFile(FileEntry fileEntry) {
fileEntry.setFilePath(getPath(fileEntry.getFilePath())); fileEntry.setFilePath(getPath(fileEntry.getFilePath()));
......
...@@ -435,6 +435,7 @@ public class IReportServiceImpl implements ReportService { ...@@ -435,6 +435,7 @@ public class IReportServiceImpl implements ReportService {
}); });
} }
//查询报送状态
@Override @Override
public void quaryReportedStatus(FileEntry fileEntry) throws QgException { public void quaryReportedStatus(FileEntry fileEntry) throws QgException {
...@@ -450,7 +451,7 @@ public class IReportServiceImpl implements ReportService { ...@@ -450,7 +451,7 @@ public class IReportServiceImpl implements ReportService {
resp = taskJerseyClient.post(headerMap, null, reportConfig.getTaskUri()); resp = taskJerseyClient.post(headerMap, null, reportConfig.getTaskUri());
} catch (Exception e) { } catch (Exception e) {
log.error("查看 fileName: {} ,异常e: {} ", fileEntry.getFileName(), e); log.error("查看 fileName: {} ,异常e: {} ", fileEntry.getFileName(), e);
throw new QgException(fileEntry.getFileName() + "报送状态接口异常", e); throw new QgException(fileEntry.getFileName() + "查看报送状态接口异常", e);
} }
if (resp.getStatus() == 200) { if (resp.getStatus() == 200) {
/* /*
...@@ -503,9 +504,15 @@ public class IReportServiceImpl implements ReportService { ...@@ -503,9 +504,15 @@ public class IReportServiceImpl implements ReportService {
} }
} }
} else { } else {
log.info("[ERROR] Status: " + resp.getStatus()); log.error("报送状态查询接口失败, Status: {} , fileName: {} ", resp.getStatus(), fileEntry.getFileName());
try{
log.info("报送状态查询接口失败, entity="+resp.getEntity(String.class));
}catch (Exception e){
log.error("报送状态查询接口失败, 读取getEntity异常", e);
}
//log.info("[ERROR] Status: " + resp.getStatus());
// log.info(resp.getEntity(String.class)); // log.info(resp.getEntity(String.class));
throw new QgException("报送状态查询接口失败", "http 状态"+resp.getStatus()); throw new QgException("报送状态查询接口失败", "http 状态="+resp.getStatus()+", fileName="+fileEntry.getFileName());
} }
} }
......
...@@ -3,32 +3,32 @@ ...@@ -3,32 +3,32 @@
<mapper namespace="com.mapper.data.DataMapper"> <mapper namespace="com.mapper.data.DataMapper">
<!-- 获取日放款数据 --> <!-- 获取日放款数据 -->
<select id="getLoanDayData" parameterType="map" resultType="map"> <select id="getLoanDayData" parameterType="map" resultType="map">
set @t1=#{param.startDate}; set @t1=#{param.startDate};
set @t2=#{param.endDate}; set @t2=#{param.endDate};
select select
b.name name b.name name
,'0' pidType ,'0' pidType
,b.id_no pid ,b.id_no pid
,'913606000634663936' businessHappenOrgan ,'913606000634663936' businessHappenOrgan
,a.loan_application_history_id loanId ,a.loan_application_history_id loanId
,'2' businessType ,'2' businessType
,'21' businessKind ,'21' businessKind
,DATE_FORMAT(@t1,'%Y%m%d') openDate ,DATE_FORMAT(@t1,'%Y%m%d') openDate
,DATE_FORMAT(DATE_SUB(x.deadline,INTERVAL 1 second),'%Y%m%d') dueDate ,DATE_FORMAT(DATE_SUB(x.deadline,INTERVAL 1 second),'%Y%m%d') dueDate
,a.contract_loan_amount creditMoney ,a.contract_loan_amount creditMoney
,DATE_FORMAT(@t1,'%Y%m%d') businessHappenDate ,DATE_FORMAT(@t1,'%Y%m%d') businessHappenDate
,a.contract_loan_amount balance ,a.contract_loan_amount balance
,0 currentOverdueTotal ,0 currentOverdueTotal
,'*' repaymentStatus ,'*' repaymentStatus
from xyqb_i_loan_application_manifest_history a from xyqb_i_loan_application_manifest_history a
left join xyqb_user_i_user_detail b on a.user_id=b.user_id left join xyqb_user_i_user_detail b on a.user_id=b.user_id
left join xyqb_i_repayment_plan x on a.loan_application_history_id=x.loan_application_history_id left join xyqb_i_repayment_plan x on a.loan_application_history_id=x.loan_application_history_id
AND a.contract_term=x.term_no AND a.contract_term=x.term_no
where a.funding_corp_id in (480,710,630,790,820) and a.transaction_status in (2,5) where a.funding_corp_id in (480,710,630,790,820) and a.transaction_status in (2,5)
and a.loan_paid_at &gt;=@t1 and a.loan_paid_at &gt;=@t1
and a.loan_paid_at &lt;@t2; and a.loan_paid_at &lt;@t2;
</select> </select>
<!-- 获取日还款数据 --> <!-- 获取日还款数据 -->
<select id="getRepayDayData" resultType="map"> <select id="getRepayDayData" resultType="map">
......
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