|
|
|
@ -268,8 +268,32 @@ public class TradeLogServiceImpl implements TradeLogService {
|
|
|
|
|
add(query.getGatewayChild());
|
|
|
|
|
}});
|
|
|
|
|
}
|
|
|
|
|
PageList<JSONObject> logs = orderMapper.listIncrementalOrders(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc")));
|
|
|
|
|
PageList<JSONObject> logs = orderMapper.listIncrementalOrdersNew(params, new PageBounds(query.getPage(), query.getLimit(), Order.formString("create_time.desc")));
|
|
|
|
|
logs.stream().forEach(log->{
|
|
|
|
|
JSONObject client= clientManager.getClientInfo(log.getInteger("client_id"));
|
|
|
|
|
if(client!=null){
|
|
|
|
|
log.put("short_name",client.getString("short_name"));
|
|
|
|
|
log.put("client_moniker",client.getString("client_moniker"));
|
|
|
|
|
};
|
|
|
|
|
});
|
|
|
|
|
JSONObject result = PageListUtils.buildPageListResult(logs);
|
|
|
|
|
// JSONObject analysis = orderMapper.analysisOrders(params);
|
|
|
|
|
// result.put("analysis", analysis);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
@Override
|
|
|
|
|
public JSONObject incrementalAnalysisOrders(TradeLogQuery query, JSONObject manager) {
|
|
|
|
|
JSONObject params = query.toParams(null);
|
|
|
|
|
if (ManagerRole.BD_USER.hasRole(manager.getIntValue("role")) && !ManagerRole.ORG_MANAGER.hasRole(manager.getIntValue("role"))) {
|
|
|
|
|
params.put("bd_user", manager.getString("manager_id"));
|
|
|
|
|
}
|
|
|
|
|
orgManager.checkOrgIds(manager, params);
|
|
|
|
|
if (query.getGatewayChild() != null) {
|
|
|
|
|
params.put("trade_type", new ArrayList<Integer>() {{
|
|
|
|
|
add(query.getGatewayChild());
|
|
|
|
|
}});
|
|
|
|
|
}
|
|
|
|
|
JSONObject result = new JSONObject();
|
|
|
|
|
JSONObject analysis = orderMapper.analysisOrders(params);
|
|
|
|
|
result.put("analysis", analysis);
|
|
|
|
|
return result;
|
|
|
|
|