|
|
|
@ -1034,7 +1034,7 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject listDailyTransactions(String dateStr, String timezone, boolean thisDevOnly, JSONObject device) {
|
|
|
|
|
public JSONObject listDailyTransactions(String dateStr, String timezone, boolean thisDevOnly, JSONObject device,String app_client_ids) {
|
|
|
|
|
try {
|
|
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
|
|
|
|
dateFormat.setTimeZone(TimeZone.getTimeZone(timezone));
|
|
|
|
@ -1066,7 +1066,19 @@ public class RetailAppServiceImp implements RetailAppService {
|
|
|
|
|
}
|
|
|
|
|
JSONObject res = new JSONObject();
|
|
|
|
|
res.put("transactions", transactions);
|
|
|
|
|
JSONObject analysis = transactionMapper.analysisRetailDailyReport(date, to, devId, device.getIntValue("client_id"));
|
|
|
|
|
String [] param_client_ids = null;
|
|
|
|
|
if(StringUtils.isEmpty(app_client_ids)) {
|
|
|
|
|
JSONArray client_ids = clientManager.getAllClientIds(device.getIntValue("client_id"));
|
|
|
|
|
if (client_ids.size() > 1) {
|
|
|
|
|
param_client_ids = new String[client_ids.size()];
|
|
|
|
|
client_ids.toArray(param_client_ids);
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
param_client_ids = app_client_ids.split(",");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JSONObject analysis = transactionMapper.analysisRetailDailyReport(date, to, devId, device.getIntValue("client_id"),param_client_ids);
|
|
|
|
|
analysis.put("date", TimeZoneUtils.formatTime(date, "dd/MMM/yyyy", timezone));
|
|
|
|
|
analysis.put("display_amount",display_amount);
|
|
|
|
|
analysis.put("cny_display_amount",cny_display_amount);
|
|
|
|
|