|
|
@ -5,7 +5,6 @@ import au.com.royalpay.payment.manage.permission.manager.PartnerMapping;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.CommonConsts;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import au.com.royalpay.payment.tools.exceptions.BadRequestException;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import org.apache.commons.lang3.time.DateFormatUtils;
|
|
|
|
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
import org.apache.commons.lang3.time.DateUtils;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
@ -14,7 +13,6 @@ import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.text.ParseException;
|
|
|
|
import java.util.Date;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
|
@ -46,14 +44,7 @@ public class CleanLogClientController {
|
|
|
|
@RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}")
|
|
|
|
@RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}")
|
|
|
|
public JSONObject listClearingTransactionsOfMergeSettle(@PathVariable int client_id, @PathVariable String reportDate,
|
|
|
|
public JSONObject listClearingTransactionsOfMergeSettle(@PathVariable int client_id, @PathVariable String reportDate,
|
|
|
|
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
|
|
|
|
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
|
|
|
|
Date date = new Date();
|
|
|
|
JSONObject data = cleanService.listClearingTransactionsByMergeSettle(partner.getIntValue("client_id"), reportDate, partner);
|
|
|
|
try {
|
|
|
|
|
|
|
|
date = DateUtils.parseDate(reportDate, "yyyy-MM-dd");
|
|
|
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
|
|
|
logger.error("parse report date error:{}", e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String realRDate = DateFormatUtils.format(DateUtils.addDays(date, 1), "yyyy-MM-dd");
|
|
|
|
|
|
|
|
JSONObject data = cleanService.listClearingTransactionsByMergeSettle(partner.getIntValue("client_id"), realRDate, partner);
|
|
|
|
|
|
|
|
data.put("report_date", reportDate);
|
|
|
|
data.put("report_date", reportDate);
|
|
|
|
return data;
|
|
|
|
return data;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -67,14 +58,7 @@ public class CleanLogClientController {
|
|
|
|
@RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}/analysis/{channel}")
|
|
|
|
@RequestMapping("/{client_id}/settlement_logs/report_date/{reportDate}/analysis/{channel}")
|
|
|
|
public Map<String,JSONObject> channelAndDayOfMergeSettleAnalysis(@PathVariable int client_id, @PathVariable String reportDate,
|
|
|
|
public Map<String,JSONObject> channelAndDayOfMergeSettleAnalysis(@PathVariable int client_id, @PathVariable String reportDate,
|
|
|
|
@PathVariable String channel, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
|
|
|
|
@PathVariable String channel, @ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner) {
|
|
|
|
Date date = new Date();
|
|
|
|
return cleanService.channelAndDayOfMergeSettleAnalysis(client_id, reportDate,channel,partner);
|
|
|
|
try {
|
|
|
|
|
|
|
|
date = DateUtils.parseDate(reportDate, "yyyy-MM-dd");
|
|
|
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
|
|
|
logger.error("parse report date error:{}", e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String realRDate = DateFormatUtils.format(DateUtils.addDays(date, 1), "yyyy-MM-dd");
|
|
|
|
|
|
|
|
return cleanService.channelAndDayOfMergeSettleAnalysis(client_id, realRDate,channel,partner);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@PartnerMapping("/{client_id}/settlement_logs/{clearingDetailId}/export")
|
|
|
|
@PartnerMapping("/{client_id}/settlement_logs/{clearingDetailId}/export")
|
|
|
@ -86,14 +70,7 @@ public class CleanLogClientController {
|
|
|
|
@PartnerMapping("/{client_id}/settlement_logs/report_date/{reportDate}/export")
|
|
|
|
@PartnerMapping("/{client_id}/settlement_logs/report_date/{reportDate}/export")
|
|
|
|
public void exportTransactionsByReportDate(@PathVariable int client_id, @PathVariable String reportDate,
|
|
|
|
public void exportTransactionsByReportDate(@PathVariable int client_id, @PathVariable String reportDate,
|
|
|
|
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse resp) {
|
|
|
|
@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner, HttpServletResponse resp) {
|
|
|
|
Date date = new Date();
|
|
|
|
cleanService.exportTransactionsByReportDate(reportDate, partner, resp);
|
|
|
|
try {
|
|
|
|
|
|
|
|
date = DateUtils.parseDate(reportDate, "yyyy-MM-dd");
|
|
|
|
|
|
|
|
} catch (ParseException e) {
|
|
|
|
|
|
|
|
logger.error("parse report date error:{}", e.getMessage());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
String realRDate = DateFormatUtils.format(DateUtils.addDays(date, 1), "yyyy-MM-dd");
|
|
|
|
|
|
|
|
cleanService.exportTransactionsByReportDate(realRDate, partner, resp);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// @RequestMapping(value = "/{clearId}.json")
|
|
|
|
// @RequestMapping(value = "/{clearId}.json")
|
|
|
|