fix invoice bug

master
yuan 6 years ago
parent 418a84b7bd
commit 4fa475fbb1

@ -32,17 +32,17 @@ public class PartnerInvoiceController {
}
@PartnerMapping(value = "/trans_flow/pdf", method = RequestMethod.GET,roles = PartnerRole.ADMIN)
public void exportTransFlowPDF(TradeLogQuery query,HttpServletResponse httpResponse) throws Exception {
tradeLogService.exportTransFlow(query,getPartnerParams(query.getClient_ids()[0]),httpResponse);
public void exportTransFlowPDF(TradeLogQuery query,@ModelAttribute(CommonConsts.PARTNER_STATUS) JSONObject partner,HttpServletResponse httpResponse) throws Exception {
tradeLogService.exportTransFlow(query,getPartnerParams(partner,query.getClient_ids()[0]),httpResponse);
}
private JSONObject getPartnerParams(String client_id){
private JSONObject getPartnerParams(JSONObject partner,String client_id){
JSONObject client = clientManager.getClientInfo(Integer.parseInt(client_id));
if(client==null){
throw new NotFoundException("Client Not Exists");
}
JSONObject params = new JSONObject();
params.put("client_id",client.getIntValue("client_id"));
params.put("client_id",partner.getIntValue("client_id"));
params.put("client",client);
params.put("client_moniker",client.getString("client_moniker"));
return params;

Loading…
Cancel
Save