fix transflow clientIds

master
luoyang 5 years ago
parent b53dbf98dc
commit 0c7afb545c

@ -9,7 +9,7 @@
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<artifactId>manage</artifactId> <artifactId>manage</artifactId>
<version>1.3.41</version> <version>1.3.43</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jib-maven-plugin.version>1.8.0</jib-maven-plugin.version> <jib-maven-plugin.version>1.8.0</jib-maven-plugin.version>

@ -730,7 +730,7 @@ public class TradeLogServiceImpl implements TradeLogService {
public void exportExcel(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception { public void exportExcel(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception {
logger.debug("excel The method======= exportExcel() start......................."); logger.debug("excel The method======= exportExcel() start.......................");
JSONObject transFlow = listPartnerTransFlow(query, partner); JSONObject transFlow = listPartnerTransFlow(query, partner);
JSONObject client = clientManager.getClientInfo(Integer.parseInt(query.getClient_ids()[0])); JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id"));
if (!transFlow.getJSONArray("data").isEmpty()) { if (!transFlow.getJSONArray("data").isEmpty()) {
try { try {
List<JSONObject> dataList = transFlow.getJSONArray("data").toJavaList(JSONObject.class); List<JSONObject> dataList = transFlow.getJSONArray("data").toJavaList(JSONObject.class);
@ -815,7 +815,7 @@ public class TradeLogServiceImpl implements TradeLogService {
public void exportExcelNew(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception { public void exportExcelNew(TradeLogQuery query, JSONObject partner, HttpServletResponse response) throws Exception {
logger.debug("excel The method======= exportExcelNew() start......................."); logger.debug("excel The method======= exportExcelNew() start.......................");
JSONObject transFlow = listPartnerTransFlow(query, partner); JSONObject transFlow = listPartnerTransFlow(query, partner);
JSONObject client = clientManager.getClientInfo(Integer.parseInt(query.getClient_ids()[0])); JSONObject client = clientManager.getClientInfo(partner.getIntValue("client_id"));
if (!transFlow.getJSONArray("data").isEmpty()) { if (!transFlow.getJSONArray("data").isEmpty()) {
List<JSONObject> dataList = transFlow.getJSONArray("data").toJavaList(JSONObject.class); List<JSONObject> dataList = transFlow.getJSONArray("data").toJavaList(JSONObject.class);
try (HSSFWorkbook workbook = new HSSFWorkbook()) { try (HSSFWorkbook workbook = new HSSFWorkbook()) {
@ -1689,7 +1689,7 @@ public class TradeLogServiceImpl implements TradeLogService {
String[] clientIds = query.getClient_ids(); String[] clientIds = query.getClient_ids();
List<String> clientIdList = new ArrayList<>(); List<String> clientIdList = new ArrayList<>();
clientIdList.add("ALL"); clientIdList.add("ALL");
if (clientIds.length >= 2) { if (clientIds!=null && clientIds.length >= 2) {
clientIdList.addAll(Arrays.asList(clientIds)); clientIdList.addAll(Arrays.asList(clientIds));
} }
HSSFSheet sheet = null; HSSFSheet sheet = null;

@ -200,10 +200,12 @@ define(['angular', 'uiBootstrap', 'uiRouter'], function (angular) {
url += connectSymbol + 'dev_id=' + params.dev_id; url += connectSymbol + 'dev_id=' + params.dev_id;
connectSymbol = '&' connectSymbol = '&'
} }
params.client_ids.forEach(function (i) { if (params.client_ids) {
url += connectSymbol + 'client_ids=' + i; params.client_ids.forEach(function (i) {
connectSymbol = '&'; url += connectSymbol + 'client_ids=' + i;
}); connectSymbol = '&';
});
}
if (params.datefrom) { if (params.datefrom) {
params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd'); params.datefrom = $filter('date')(params.datefrom, 'yyyyMMdd');
url += connectSymbol + 'datefrom=' + params.datefrom; url += connectSymbol + 'datefrom=' + params.datefrom;

Loading…
Cancel
Save