|
|
@@ -40,7 +40,7 @@ public class AccountApplyTask extends AbstractTask {
|
|
|
*/
|
|
|
@TaskMapping(title = "上传打款信息", fixedDelay = 60000, method = Method.UPLOAD)
|
|
|
public void uploadDrawDraw() throws NoSuchAlgorithmException, InvalidKeyException, UnsupportedEncodingException {
|
|
|
- List<Map<String, Object>> drawDrawInfo = jdbcTemplate.queryForList("select distinct aa_code,aa_b2bCode,to_char(aa_actpaydate,'YYYY-MM-DD HH24:MI:SS') aa_actpaydate,nvl(cq_dueamount,0) cq_dueamount,nvl(cq_spamount,0) cq_spamount,to_char(cq_enddate,'YYYY-MM-DD HH24:MI:SS') cq_enddate from AccountApply left join SELLER_QUOTA_VIEW on cq_code=aa_cacode LEFT JOIN REIMBURSEMENTPLAN ON AA_CODE = RP_AACODE where aa_actpaydate is not null and aa_sendstatus='待上传' and aa_status='已审核' and aa_b2bCode is not null and RP_AACODE IS NOT NULL");
|
|
|
+ List<Map<String, Object>> drawDrawInfo = jdbcTemplate.queryForList("select distinct aa_code,aa_b2bCode,to_char(aa_actpaydate,'YYYY-MM-DD HH24:MI:SS') aa_actpaydate,nvl(cq_dueamount,0) cq_dueamount,nvl(cq_spamount,0) cq_spamount,to_char(aa_maturitydate,'YYYY-MM-DD HH24:MI:SS') cq_enddate from AccountApply left join SELLER_QUOTA_VIEW on cq_code=aa_cacode LEFT JOIN REIMBURSEMENTPLAN ON AA_CODE = RP_AACODE where aa_actpaydate is not null and aa_sendstatus='待上传' and aa_status='已审核' and aa_b2bCode is not null and RP_AACODE IS NOT NULL");
|
|
|
if(drawDrawInfo != null && drawDrawInfo.size()>0){
|
|
|
for(Map<String, Object> map : drawDrawInfo){
|
|
|
JSONObject json = new JSONObject();
|
|
|
@@ -63,7 +63,7 @@ public class AccountApplyTask extends AbstractTask {
|
|
|
|
|
|
String result = restTemplate.postForObject("http://192.168.253.3:26600/api/draw", json.toString(), String.class);
|
|
|
JSONObject response = (JSONObject) JSONObject.parse(result);
|
|
|
- if("0".equals(String.valueOf(response.get("code")))){
|
|
|
+ if("0".equals(String.valueOf(((JSONObject)response.get("respHeader")).getString("code")))){
|
|
|
jdbcTemplate.execute("update AccountApply set aa_sendstatus='已上传' where aa_code='"+ map.get("AA_CODE") +"'");
|
|
|
}
|
|
|
}
|