调整配置ID日志链接有无日志数据时都添加日志链接
This commit is contained in:
@@ -116,22 +116,21 @@ public class NtcPzReportController extends BaseController{
|
||||
String json=ConfigServiceUtil.getReport(Constants.BUSINESSTYPE_CONFIG, compileIds, serviceIds, startDate==null?null:sdf.format(startDate), endDate==null?null:sdf.format(endDate));
|
||||
List<NtcPzReport> list=getList(json);
|
||||
String[] idArr=compileIds.split(",");
|
||||
if(list!=null&&(list.size()>0)){
|
||||
for(NtcPzReport report:list) {
|
||||
Map<String, Object> data=new HashMap<String, Object>();
|
||||
data.put("compileId", report.getCfgId().longValue());
|
||||
data.put("sum",report.getSum().longValue());
|
||||
dataList.add(data);
|
||||
}
|
||||
}else {
|
||||
for(String id:idArr) {
|
||||
Map<String, Object> data=new HashMap<String, Object>();
|
||||
data.put("compileId", id);
|
||||
data.put("sum",0);
|
||||
dataList.add(data);
|
||||
for(String id:idArr) {
|
||||
Map<String, Object> data=new HashMap<String, Object>();
|
||||
data.put("compileId", id);
|
||||
Long sum=(long) 0;
|
||||
if(list!=null&&(list.size()>0)){
|
||||
for(NtcPzReport report:list) {
|
||||
if(Long.valueOf(id).longValue() == report.getCfgId().longValue()){
|
||||
sum=report.getSum().longValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
data.put("sum",sum);
|
||||
dataList.add(data);
|
||||
}
|
||||
|
||||
return dataList;
|
||||
}
|
||||
@RequestMapping("/ntcPzReport")
|
||||
|
||||
Reference in New Issue
Block a user